/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @signatureAlgorithm = 'v2';
  @endpointRule = 'regional';
  @endpointMap = {
    ap-northeast-2-pop = 'edas.ap-northeast-1.aliyuncs.com',
    ap-south-1 = 'edas.ap-northeast-1.aliyuncs.com',
    ap-southeast-3 = 'edas.ap-northeast-1.aliyuncs.com',
    ap-southeast-5 = 'edas.ap-northeast-1.aliyuncs.com',
    cn-beijing-finance-1 = 'edas.aliyuncs.com',
    cn-beijing-finance-pop = 'edas.aliyuncs.com',
    cn-beijing-gov-1 = 'edas.aliyuncs.com',
    cn-beijing-nu16-b01 = 'edas.aliyuncs.com',
    cn-chengdu = 'edas.aliyuncs.com',
    cn-edge-1 = 'edas.aliyuncs.com',
    cn-fujian = 'edas.aliyuncs.com',
    cn-haidian-cm12-c01 = 'edas.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'edas.aliyuncs.com',
    cn-hangzhou-finance = 'edas.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'edas.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'edas.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'edas.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'edas.aliyuncs.com',
    cn-hangzhou-test-306 = 'edas.aliyuncs.com',
    cn-hongkong-finance-pop = 'edas.aliyuncs.com',
    cn-huhehaote = 'edas.aliyuncs.com',
    cn-qingdao-nebula = 'edas.aliyuncs.com',
    cn-shanghai-et15-b01 = 'edas.aliyuncs.com',
    cn-shanghai-et2-b01 = 'edas.aliyuncs.com',
    cn-shanghai-finance-1 = 'edas.aliyuncs.com',
    cn-shanghai-inner = 'edas.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'edas.aliyuncs.com',
    cn-shenzhen-finance-1 = 'edas.aliyuncs.com',
    cn-shenzhen-inner = 'edas.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'edas.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'edas.aliyuncs.com',
    cn-wuhan = 'edas.aliyuncs.com',
    cn-yushanfang = 'edas.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'edas.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'edas.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'edas.aliyuncs.com',
    eu-west-1 = 'edas.ap-northeast-1.aliyuncs.com',
    eu-west-1-oxs = 'edas.ap-northeast-1.aliyuncs.com',
    me-east-1 = 'edas.ap-northeast-1.aliyuncs.com',
    rus-west-1-pop = 'edas.ap-northeast-1.aliyuncs.com',
    us-west-1 = 'edas.ap-northeast-1.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('edas', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AppConfig {
  command?: string(name='Command'),
  commandArgs?: [ string ](name='CommandArgs'),
  configMountDescs?: [ 
    {
      mountItems?: [ 
        {
          key?: string(name='Key'),
          path?: string(name='Path'),
        }
      ](name='MountItems'),
      mountPath?: string(name='MountPath'),
      name?: string(name='Name'),
      type?: string(name='Type'),
    }
  ](name='ConfigMountDescs'),
  deployAcrossNodes?: boolean(name='DeployAcrossNodes'),
  deployAcrossZones?: boolean(name='DeployAcrossZones'),
  emptyDirs?: [ 
    {
      mountPath?: string(name='MountPath'),
      name?: string(name='Name'),
      readOnly?: boolean(name='ReadOnly'),
      subPathExpr?: string(name='SubPathExpr'),
    }
  ](name='EmptyDirs'),
  enableAhas?: boolean(name='EnableAhas'),
  envFroms?: [ 
    {
      configMapRef?: string(name='ConfigMapRef'),
      secretRef?: string(name='SecretRef'),
    }
  ](name='EnvFroms'),
  envs?: [ 
    {
      name?: string(name='Name'),
      value?: string(name='Value'),
      valueFrom?: string(name='ValueFrom'),
    }
  ](name='Envs'),
  imageConfig?: {
    containerRegistryId?: string(name='ContainerRegistryId'),
    crInstanceId?: string(name='CrInstanceId'),
    crRegionId?: string(name='CrRegionId'),
    imageUrl?: string(name='ImageUrl'),
  }(name='ImageConfig'),
  isMultilingualApp?: boolean(name='IsMultilingualApp'),
  javaStartUpConfig?: string(name='JavaStartUpConfig'),
  limitCpu?: string(name='LimitCpu'),
  limitMem?: string(name='LimitMem'),
  liveness?: string(name='Liveness'),
  localVolumes?: [ 
    {
      mountPath?: string(name='MountPath'),
      name?: string(name='Name'),
      nodePath?: string(name='NodePath'),
      opsAuth?: long(name='OpsAuth'),
      type?: string(name='Type'),
    }
  ](name='LocalVolumes'),
  nasId?: string(name='NasId'),
  nasMountDescs?: [ 
    {
      mountPath?: string(name='MountPath'),
      nasPath?: string(name='NasPath'),
    }
  ](name='NasMountDescs'),
  nasStorageType?: string(name='NasStorageType'),
  packageConfig?: {
    edasContainerVersion?: string(name='EdasContainerVersion'),
    jdk?: string(name='Jdk'),
    packageType?: string(name='PackageType'),
    packageUrl?: string(name='PackageUrl'),
    packageVersion?: string(name='PackageVersion'),
    timezone?: string(name='Timezone'),
    uriEncoding?: string(name='UriEncoding'),
    useBodyEncoding?: boolean(name='UseBodyEncoding'),
    webContainer?: string(name='WebContainer'),
  }(name='PackageConfig'),
  postStart?: string(name='PostStart'),
  preStop?: string(name='PreStop'),
  pvcMountDescs?: [ 
    {
      mountPaths?: [ 
        {
          mountPath?: string(name='MountPath'),
          readOnly?: boolean(name='ReadOnly'),
          subPathExpr?: string(name='SubPathExpr'),
        }
      ](name='MountPaths'),
      pvcName?: string(name='PvcName'),
    }
  ](name='PvcMountDescs'),
  readiness?: string(name='Readiness'),
  replicas?: long(name='Replicas'),
  requestCpu?: string(name='RequestCpu'),
  requestMem?: string(name='RequestMem'),
  runtimeClassName?: string(name='RuntimeClassName'),
  slsConfigs?: [ 
    {
      logDir?: string(name='LogDir'),
      logstore?: string(name='Logstore'),
      project?: string(name='Project'),
      type?: string(name='Type'),
    }
  ](name='SlsConfigs'),
  webContainerConfig?: {
    connectorType?: string(name='ConnectorType'),
    contextInputType?: string(name='ContextInputType'),
    contextPath?: string(name='ContextPath'),
    httpPort?: long(name='HttpPort'),
    maxThreads?: long(name='MaxThreads'),
    serverXml?: string(name='ServerXml'),
    uriEncoding?: string(name='UriEncoding'),
    useAdvancedServerXml?: boolean(name='UseAdvancedServerXml'),
    useBodyEncoding?: boolean(name='UseBodyEncoding'),
    useDefaultConfig?: boolean(name='UseDefaultConfig'),
  }(name='WebContainerConfig'),
}

model AbortAndRollbackChangeOrderRequest {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.

This parameter is required.', example='6b55106c-c7f2-40f7-a1d4-092870*****'),
}

model AbortAndRollbackChangeOrderResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='4f40e616-cdcd-4250-a018-efd459******'),
  }(name='Data', description='The information about the change process.'),
  errorCode?: string(name='ErrorCode', description='The error code that is returned.', example='success'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='81E0B333-2871-****-****-B8F5FF43****'),
  traceId?: string(name='TraceId', description='The ID of the trace.', example='210f07bf1640239405712621******'),
}

model AbortAndRollbackChangeOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AbortAndRollbackChangeOrderResponseBody(name='body'),
}

/**
 * @summary Terminates a change process and rolls back the application. This operation is applicable to applications that are deployed in Container Service for Kubernetes (ACK) clusters.
 *
 * @param request AbortAndRollbackChangeOrderRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AbortAndRollbackChangeOrderResponse
 */
async function abortAndRollbackChangeOrderWithOptions(request: AbortAndRollbackChangeOrderRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AbortAndRollbackChangeOrderResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.changeOrderId)) {
    query['ChangeOrderId'] = request.changeOrderId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AbortAndRollbackChangeOrder',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/change_order_abort_and_rollback`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Terminates a change process and rolls back the application. This operation is applicable to applications that are deployed in Container Service for Kubernetes (ACK) clusters.
 *
 * @param request AbortAndRollbackChangeOrderRequest
 * @return AbortAndRollbackChangeOrderResponse
 */
async function abortAndRollbackChangeOrder(request: AbortAndRollbackChangeOrderRequest): AbortAndRollbackChangeOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return abortAndRollbackChangeOrderWithOptions(request, headers, runtime);
}

model AbortChangeOrderRequest {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process. You can call the [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html) operation to query the change process ID.

This parameter is required.', example='4f038ddf-b27b-****-****-88e44375****'),
}

model AbortChangeOrderResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='4f038ddf-b27b-****-****-88e44375****'),
  }(name='Data', description='The change process.'),
  errorCode?: string(name='ErrorCode', description='The error code that is returned.', example='success'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57F146F6-3C94-****-****-A66EF4B9*****'),
  traceId?: string(name='TraceId', description='The ID of the trace.', example='0b59000b15947****55688656d****'),
}

model AbortChangeOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AbortChangeOrderResponseBody(name='body'),
}

/**
 * @summary Terminates a change process.
 *
 * @param request AbortChangeOrderRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AbortChangeOrderResponse
 */
async function abortChangeOrderWithOptions(request: AbortChangeOrderRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AbortChangeOrderResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.changeOrderId)) {
    query['ChangeOrderId'] = request.changeOrderId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AbortChangeOrder',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/change_order_abort`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Terminates a change process.
 *
 * @param request AbortChangeOrderRequest
 * @return AbortChangeOrderResponse
 */
async function abortChangeOrder(request: AbortChangeOrderRequest): AbortChangeOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return abortChangeOrderWithOptions(request, headers, runtime);
}

model AddLogPathRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-4f92-4413**********'),
  path?: string(name='Path', description='The absolute path of the log directory that you want to add. The value must start and end with a forward slash (`/`) and must contain `/log` or `/logs`. The following directories are the default log directories in Enterprise Distributed Application Service (EDAS):

*   /home/admin/edas-container/logs/
*   /home/admin/taobao-tomcat-7.0.59/logs/
*   /home/admin/taobao-tomcat-production-7.0.59.3/logs/
*   /home/admin/taobao-tomcat-production-7.0.70/logs/
*   /home/admin/edas-agent/logs/

This parameter is required.', example='/temp/log/'),
}

model AddLogPathResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='3616cdca-4f92-4413**********'),
}

model AddLogPathResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddLogPathResponseBody(name='body'),
}

/**
 * @summary Adds a log directory to an application. This operation is applicable to applications that are deployed in Alibaba Cloud Elastic Compute Service (ECS) clusters and hybrid cloud ECS clusters.
 *
 * @param request AddLogPathRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddLogPathResponse
 */
async function addLogPathWithOptions(request: AddLogPathRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AddLogPathResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.path)) {
    body['Path'] = request.path;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddLogPath',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/log/popListLogDirs`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds a log directory to an application. This operation is applicable to applications that are deployed in Alibaba Cloud Elastic Compute Service (ECS) clusters and hybrid cloud ECS clusters.
 *
 * @param request AddLogPathRequest
 * @return AddLogPathResponse
 */
async function addLogPath(request: AddLogPathRequest): AddLogPathResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return addLogPathWithOptions(request, headers, runtime);
}

model AuthorizeApplicationRequest {
  appIds?: string(name='AppIds', description='The ID of the application. You can specify multiple IDs. Separate multiple IDs with semicolons (;). If you leave this parameter empty, the permissions on the application are revoked.

This parameter is required.', example='5fdf50e8-*****;696-******'),
  targetUserId?: string(name='TargetUserId', description='The ID of the RAM user to be authorized. The value of the parameter is in the `sub-account name@primary account UID` format.

This parameter is required.', example='test@133434434****'),
}

model AuthorizeApplicationResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='E3DA95D3-**********'),
}

model AuthorizeApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthorizeApplicationResponseBody(name='body'),
}

/**
 * @summary Grants a Resource Access Management (RAM) user the permissions on a specified application.
 *
 * @param request AuthorizeApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthorizeApplicationResponse
 */
async function authorizeApplicationWithOptions(request: AuthorizeApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AuthorizeApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.targetUserId)) {
    query['TargetUserId'] = request.targetUserId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AuthorizeApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/authorize_app`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Grants a Resource Access Management (RAM) user the permissions on a specified application.
 *
 * @param request AuthorizeApplicationRequest
 * @return AuthorizeApplicationResponse
 */
async function authorizeApplication(request: AuthorizeApplicationRequest): AuthorizeApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return authorizeApplicationWithOptions(request, headers, runtime);
}

model AuthorizeResourceGroupRequest {
  resourceGroupIds?: string(name='ResourceGroupIds', description='The ID of the resource group. You can call the ListResourceGroup operation to query the resource group ID. For more information, see [ListResourceGroup](https://help.aliyun.com/document_detail/62055.html).

You can specify multiple resource group IDs. Separate multiple resource group IDs with semicolons (;).

This parameter is required.', example='461;462'),
  targetUserId?: string(name='TargetUserId', description='The ID of the RAM user to be authorized.

This parameter is required.', example='test@13333********'),
}

model AuthorizeResourceGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57609587-DFA2-**********'),
}

model AuthorizeResourceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthorizeResourceGroupResponseBody(name='body'),
}

/**
 * @summary Grants a Resource Access Management (RAM) user the permissions on a resource group.
 *
 * @param request AuthorizeResourceGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthorizeResourceGroupResponse
 */
async function authorizeResourceGroupWithOptions(request: AuthorizeResourceGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AuthorizeResourceGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.resourceGroupIds)) {
    query['ResourceGroupIds'] = request.resourceGroupIds;
  }
  if (!Util.isUnset(request.targetUserId)) {
    query['TargetUserId'] = request.targetUserId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AuthorizeResourceGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/authorize_res_group`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Grants a Resource Access Management (RAM) user the permissions on a resource group.
 *
 * @param request AuthorizeResourceGroupRequest
 * @return AuthorizeResourceGroupResponse
 */
async function authorizeResourceGroup(request: AuthorizeResourceGroupRequest): AuthorizeResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return authorizeResourceGroupWithOptions(request, headers, runtime);
}

model AuthorizeRoleRequest {
  roleIds?: string(name='RoleIds', description='The ID of the role to be assigned. If you want to assign multiple roles to the specified RAM user, separate the IDs of the roles with semicolons (;). If you leave this parameter empty, the roles assigned to the specified RAM user are revoked.

This parameter is required.', example='1;2'),
  targetUserId?: string(name='TargetUserId', description='The ID of the RAM user to which you want to assign the roles.

This parameter is required.', example='test@133******'),
}

model AuthorizeRoleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57609587-DFA2-*******'),
}

model AuthorizeRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthorizeRoleResponseBody(name='body'),
}

/**
 * @summary Assigns one or more roles to a RAM user.
 *
 * @param request AuthorizeRoleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthorizeRoleResponse
 */
async function authorizeRoleWithOptions(request: AuthorizeRoleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AuthorizeRoleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.roleIds)) {
    query['RoleIds'] = request.roleIds;
  }
  if (!Util.isUnset(request.targetUserId)) {
    query['TargetUserId'] = request.targetUserId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AuthorizeRole',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/authorize_role`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Assigns one or more roles to a RAM user.
 *
 * @param request AuthorizeRoleRequest
 * @return AuthorizeRoleResponse
 */
async function authorizeRole(request: AuthorizeRoleRequest): AuthorizeRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return authorizeRoleWithOptions(request, headers, runtime);
}

model BindEcsSlbRequest {
  appId?: string(name='AppId', description='The ID of the application. You can query the application ID by calling the ListApplication operation. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='93fdd228-*****-ed2ae98de18d'),
  deployGroupId?: string(name='DeployGroupId', description='The ID of the instance group whose application you want to bind. You can call the ListDeployGroup operation to query the group ID. For more information, see [ListDeployGroup](https://help.aliyun.com/document_detail/62077.html).', example='577f4c50-16ee-43d8-****-****'),
  listenerHealthCheckUrl?: string(name='ListenerHealthCheckUrl', description='The health check URL.', example='/_ehc.html'),
  listenerPort?: int32(name='ListenerPort', description='The listener port for the SLB instance.

This parameter is required.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The listener protocol for the SLB instance.

This parameter is required.', example='tcp'),
  slbId?: string(name='SlbId', description='The ID of the SLB instance.

This parameter is required.', example='lb-uf6j54m3a****cj01jx8'),
  VForwardingUrlRule?: string(name='VForwardingUrlRule', description='The forwarding rule of the SLB listener.', example='example.com/forwarding'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group for the SLB instance.', example='rsp-2ze****6l*****'),
  VServerGroupName?: string(name='VServerGroupName', description='The name of the vServer group.', example='****/31405/internet-test-ack-test****/default/clusterid'),
}

model BindEcsSlbResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The change process ID for this operation.', example='cd65b247-****-475b-ad4b-7039040d625c'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='03FD1520-0FD6-436A-****-265318D7****'),
}

model BindEcsSlbResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindEcsSlbResponseBody(name='body'),
}

/**
 * @summary Binds a Server Load Balancer (SLB) instance to an application that is deployed in an Elastic Compute Service (ECS) cluster.
 *
 * @param request BindEcsSlbRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindEcsSlbResponse
 */
async function bindEcsSlbWithOptions(request: BindEcsSlbRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BindEcsSlbResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.deployGroupId)) {
    query['DeployGroupId'] = request.deployGroupId;
  }
  if (!Util.isUnset(request.listenerHealthCheckUrl)) {
    query['ListenerHealthCheckUrl'] = request.listenerHealthCheckUrl;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.slbId)) {
    query['SlbId'] = request.slbId;
  }
  if (!Util.isUnset(request.VForwardingUrlRule)) {
    query['VForwardingUrlRule'] = request.VForwardingUrlRule;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.VServerGroupName)) {
    query['VServerGroupName'] = request.VServerGroupName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BindEcsSlb',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/slb/bind_slb`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Binds a Server Load Balancer (SLB) instance to an application that is deployed in an Elastic Compute Service (ECS) cluster.
 *
 * @param request BindEcsSlbRequest
 * @return BindEcsSlbResponse
 */
async function bindEcsSlb(request: BindEcsSlbRequest): BindEcsSlbResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return bindEcsSlbWithOptions(request, headers, runtime);
}

model BindK8sSlbRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='5a166fbd-****-****-a286-781659d9f54c'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='712082c3-f554-****-****-a947b5cde6ee'),
  port?: string(name='Port', description='The frontend port. Valid values: 1 to 65535.', example='80'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm for the SLB instance. If you do not specify this parameter, the default value rr is used. Valid values:

*   wrr: weighted round-robin scheduling. Backend servers that have higher weights receive more requests than those that have lower weights.
*   rr: round-robin scheduling. Requests are sequentially distributed to backend servers.', example='wrr'),
  servicePortInfos?: string(name='ServicePortInfos', description='The information about the ports. This parameter is required if you want to configure multi-port mappings or use a protocol other than TCP. You must set this parameter to a JSON array. Example: [{"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"1362469756373809_16c185d6fa2_1914500329_-xxxxxxx","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}]

*   port: The frontend port. Valid values: 1 to 65535. This parameter is required. Each port must be unique.
*   targetPort: The backend port. Valid values: 1 to 65535. This parameter is required.
*   loadBalancerProtocol: This parameter is required. Valid values: TCP and HTTPS. If the HTTP protocol is used, set this parameter to TCP.
*   certId: the ID of the certificate. This parameter is required if the HTTPS protocol is used. You can purchase an SLB instance in the SLB console.

> The ServicePortInfos parameter is specified to support multi-port mappings. If you want this parameter to take effect, make sure that you have set the AppId, ClusterId, Type, and SlbId parameters.', example='[{"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"136246975637380916c185d6fa21914500329_-988as","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}]'),
  slbId?: string(name='SlbId', description='The ID of the SLB instance. If you leave this parameter empty, Enterprise Distributed Application Service (EDAS) automatically purchases an SLB instance.', example='lb-2ze1quax9t****iz82bjt'),
  slbProtocol?: string(name='SlbProtocol', description='The protocol used by the SLB instance. Valid values: TCP, HTTP, and HTTPS.', example='TCP'),
  specification?: string(name='Specification', description='The instance type of the SLB instance. Valid values:

*   slb.s1.small
*   slb.s2.small
*   slb.s2.medium
*   slb.s3.small
*   slb.s3.medium
*   slb.s3.large', example='slb.s1.small'),
  targetPort?: string(name='TargetPort', description='The backend port, which is also the service port of the application. Valid values: 1 to 65535.', example='8080'),
  type?: string(name='Type', description='The type of the SLB instance. Valid values:

*   internet: Internet-facing SLB instance
*   intranet: internal-facing SLB instance

This parameter is required.', example='internet'),
}

model BindK8sSlbResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='b4b37bde-a125-****-****-741f7f4a9ae3'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-****'),
}

model BindK8sSlbResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindK8sSlbResponseBody(name='body'),
}

/**
 * @summary Binds a Server Load Balancer (SLB) instance to an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request BindK8sSlbRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindK8sSlbResponse
 */
async function bindK8sSlbWithOptions(request: BindK8sSlbRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BindK8sSlbResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.port)) {
    query['Port'] = request.port;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.servicePortInfos)) {
    query['ServicePortInfos'] = request.servicePortInfos;
  }
  if (!Util.isUnset(request.slbId)) {
    query['SlbId'] = request.slbId;
  }
  if (!Util.isUnset(request.slbProtocol)) {
    query['SlbProtocol'] = request.slbProtocol;
  }
  if (!Util.isUnset(request.specification)) {
    query['Specification'] = request.specification;
  }
  if (!Util.isUnset(request.targetPort)) {
    query['TargetPort'] = request.targetPort;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BindK8sSlb',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_slb_binding`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Binds a Server Load Balancer (SLB) instance to an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request BindK8sSlbRequest
 * @return BindK8sSlbResponse
 */
async function bindK8sSlb(request: BindK8sSlbRequest): BindK8sSlbResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return bindK8sSlbWithOptions(request, headers, runtime);
}

model BindSlbRequest {
  appId?: string(name='AppId', description='The ID of the EDAS application.

This parameter is required.', example='3616cdca-*********'),
  listenerPort?: int32(name='ListenerPort', description='The listener port for the SLB instance.', example='80'),
  slbId?: string(name='SlbId', description='The ID of the SLB instance.

This parameter is required.', example='lb-wz96ph63r************'),
  slbIp?: string(name='SlbIp', description='The IP address of the SLB instance.

This parameter is required.', example='192.16*.*.*'),
  type?: string(name='Type', description='The type of the SLB instance. Valid values:

*   internet: Internet-facing SLB instance
*   intranet: internal-facing SLB instance

This parameter is required.', example='intranet'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group for the internal-facing SLB instance.', example='rsp-cige6******'),
}

model BindSlbResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    extSlbId?: string(name='ExtSlbId', description='The ID of the Internet-facing SLB instance.', example='“”'),
    extSlbIp?: string(name='ExtSlbIp', description='The IP address of the Internet-facing SLB instance.', example='“”'),
    extSlbName?: string(name='ExtSlbName', description='The name of the Internet-facing SLB instance.', example='“”'),
    extVServerGroupId?: string(name='ExtVServerGroupId', description='The ID of the vServer group for the Internet-facing SLB instance.', example='“”'),
    slbId?: string(name='SlbId', description='The ID of the internal-facing SLB instance.', example='lb-wz96ph63r************'),
    slbIp?: string(name='SlbIp', description='The IP address of the internal-facing SLB instance.', example='192.16*.*.*'),
    slbName?: string(name='SlbName', description='The name of the internal-facing SLB instance.', example='test**********'),
    slbPort?: int32(name='SlbPort', description='The listener port for the SLB instance.', example='80'),
    VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group for the internal-facing SLB instance.', example='“”'),
  }(name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The additional information that is returned.', example='bind slb success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='23DR4FDXXXXXXXXXX'),
}

model BindSlbResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindSlbResponseBody(name='body'),
}

/**
 * @summary Binds a Server Load Balancer (SLB) instance to an application in Enterprise Distributed Application Service (EDAS).
 *
 * @param request BindSlbRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindSlbResponse
 */
async function bindSlbWithOptions(request: BindSlbRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BindSlbResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.slbId)) {
    query['SlbId'] = request.slbId;
  }
  if (!Util.isUnset(request.slbIp)) {
    query['SlbIp'] = request.slbIp;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BindSlb',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/app/bind_slb_json`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Binds a Server Load Balancer (SLB) instance to an application in Enterprise Distributed Application Service (EDAS).
 *
 * @param request BindSlbRequest
 * @return BindSlbResponse
 */
async function bindSlb(request: BindSlbRequest): BindSlbResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return bindSlbWithOptions(request, headers, runtime);
}

model ChangeDeployGroupRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='3616cdca-4f92-**********'),
  eccInfo?: string(name='EccInfo', description='The ID of the elastic compute component (ECC) that corresponds to the ECS instance for which you want to change the application instance group. You can call the ListApplicationEcc operation to query the ECC ID. For more information, see [ListApplicationEcc](https://help.aliyun.com/document_detail/199277.html).

> You can change the application instance group for only one ECS instance at a time.

This parameter is required.', example='0cf49a6c-95a8-4aa8******'),
  forceStatus?: boolean(name='ForceStatus', description='Specifies whether to forcibly change the application instance group if the deployment package version of the ECC is different from that of the application instance group.', example='true'),
  groupName?: string(name='GroupName', description='The name of the application instance group. Examples: group_a and group_b. The parameter value for the default application instance group is `_DEFAULT_GROUP`. The name can be up to 64 characters in length.

This parameter is required.', example='test'),
}

model ChangeDeployGroupResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='435f-regfr4********************'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='F9E4-FDS4-****************'),
}

model ChangeDeployGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ChangeDeployGroupResponseBody(name='body'),
}

/**
 * @summary Changes the application instance group for an Elastic Compute Service (ECS) instance in an ECS cluster.
 *
 * @param request ChangeDeployGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ChangeDeployGroupResponse
 */
async function changeDeployGroupWithOptions(request: ChangeDeployGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ChangeDeployGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.eccInfo)) {
    query['EccInfo'] = request.eccInfo;
  }
  if (!Util.isUnset(request.forceStatus)) {
    query['ForceStatus'] = request.forceStatus;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ChangeDeployGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_change_group`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Changes the application instance group for an Elastic Compute Service (ECS) instance in an ECS cluster.
 *
 * @param request ChangeDeployGroupRequest
 * @return ChangeDeployGroupResponse
 */
async function changeDeployGroup(request: ChangeDeployGroupRequest): ChangeDeployGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return changeDeployGroupWithOptions(request, headers, runtime);
}

model ContinuePipelineRequest {
  confirm?: boolean(name='Confirm', description='Specifies whether to release the next batch. Valid values:

*   true: releases the next batch.
*   false: does not release the next batch.', example='true'),
  pipelineId?: string(name='PipelineId', description='The ID of the change process. You can call the GetChangeOrderInfo operation to query the ID of the change process that corresponds to a specific batch. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).

This parameter is required.', example='5648dbd7-df13********************'),
}

model ContinuePipelineResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-****************'),
}

model ContinuePipelineResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ContinuePipelineResponseBody(name='body'),
}

/**
 * @summary Manually confirms the release of the next batch.
 *
 * @param request ContinuePipelineRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ContinuePipelineResponse
 */
async function continuePipelineWithOptions(request: ContinuePipelineRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ContinuePipelineResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.confirm)) {
    query['Confirm'] = request.confirm;
  }
  if (!Util.isUnset(request.pipelineId)) {
    query['PipelineId'] = request.pipelineId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ContinuePipeline',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/pipeline_batch_confirm`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Manually confirms the release of the next batch.
 *
 * @param request ContinuePipelineRequest
 * @return ContinuePipelineResponse
 */
async function continuePipeline(request: ContinuePipelineRequest): ContinuePipelineResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return continuePipelineWithOptions(request, headers, runtime);
}

model ConvertK8sResourceRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster. You can call the ListCluster operation to query the cluster ID. For more information, see [ListCluster](https://help.aliyun.com/document_detail/154995.html).

This parameter is required.', example='b07c8192-****-adf4f7447720'),
  namespace?: string(name='Namespace', description='The namespace.

This parameter is required.', example='default'),
  resourceName?: string(name='ResourceName', description='The name of the resource.

This parameter is required.', example='deployment-to-convert'),
  resourceType?: string(name='ResourceType', description='The type of the resource that is used. Set the value to deployment.

This parameter is required.', example='deployment'),
}

model ConvertK8sResourceResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='convert success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='BA938591-*********-9690-BFD3F4DD7A93'),
}

model ConvertK8sResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ConvertK8sResourceResponseBody(name='body'),
}

/**
 * @summary Converts a Deployment into an application.
 *
 * @param request ConvertK8sResourceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ConvertK8sResourceResponse
 */
async function convertK8sResourceWithOptions(request: ConvertK8sResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ConvertK8sResourceResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.resourceName)) {
    query['ResourceName'] = request.resourceName;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ConvertK8sResource',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/oam/k8s_resource_convert`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Converts a Deployment into an application.
 *
 * @param request ConvertK8sResourceRequest
 * @return ConvertK8sResourceResponse
 */
async function convertK8sResource(request: ConvertK8sResourceRequest): ConvertK8sResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return convertK8sResourceWithOptions(request, headers, runtime);
}

model CreateApplicationScalingRuleRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplicationlink](https://help.aliyun.com/document_detail/149390.html).', example='78194c76-3dca-418e-a263-cccd1ab4****'),
  scalingBehaviour?: string(name='ScalingBehaviour', description='Configure custom elastic behavior, refer to the example for specific data structure.', example='{
      "scaleUp": {
            "stabilizationWindowSeconds": "0",
            "selectPolicy": "Max",
            "policies": [
                  {
                        "type": "Pods",
                        "value": 5,
                        "periodSeconds": 15
                  }
            ]
      },
      "scaleDown": {
            "stabilizationWindowSeconds": "300",
            "selectPolicy": "Max",
            "policies": [
                  {
                        "type": "Percent",
                        "value": 200,
                        "periodSeconds": 15
                  }
            ]
      }
}'),
  scalingRuleEnable?: boolean(name='ScalingRuleEnable', description='Specifies whether to enable the auto scaling policy. Valid values:

*   **true**: enables the auto scaling policy.
*   **false**: disables the auto scaling policy.', example='true'),
  scalingRuleMetric?: string(name='ScalingRuleMetric', description='This parameter is deprecated.', example='1'),
  scalingRuleName?: string(name='ScalingRuleName', description='The name of the auto scaling policy. The name must start with a lowercase letter, and can contain lowercase letters, digits, and hyphens (-). The name must be 1 to 32 characters in length.', example='cpu-trigger'),
  scalingRuleTimer?: string(name='ScalingRuleTimer', description='This parameter is deprecated.', example='1'),
  scalingRuleTrigger?: string(name='ScalingRuleTrigger', description='The trigger policy for the auto scaling policy. Set the value in the JSON format by using the ScalingRuleTriggerDTO class. For more information, see Additional information about request parameters.', example='ScalingRuleTriggerDTO{......}'),
  scalingRuleType?: string(name='ScalingRuleType', description='The type of the auto scaling policy. Set the value to **trigger**.', example='trigger'),
}

model CreateApplicationScalingRuleResponseBody = {
  appScalingRule?: {
    appId?: string(name='AppId', description='The ID of the application to which the auto scaling policy belongs.', example='78194c76-3dca-418e-a263-cccd1ab4****'),
    behaviour?: {
      scaleDown?: {
        policies?: [ 
          {
            periodSeconds?: int32(name='PeriodSeconds', description='检查执行的周期，取值范围[0, 1800]，单位为秒。', example='15'),
            type?: string(name='Type', description='策略类型，可为Pods或Percent。', example='Pods'),
            value?: string(name='Value', description='弹性行为的策略值，大于零的整数。若策略类型为Pods，则该值表示Pods数量；若策略类型为Percent，则该值表示百分比，允许超过100%。', example='10'),
          }
        ](name='Policies', description='策略配置。'),
        selectPolicy?: string(name='SelectPolicy', description='弹性缩容步长策略，可选值Max、Min、Disable。', example='Max'),
        stabilizationWindowSeconds?: int32(name='StabilizationWindowSeconds', description='缩容冷却时间。取值范围[0, 3600]，单位为秒。默认为300秒。', example='300'),
      }(name='ScaleDown', description='弹性缩容行为配置。'),
      scaleUp?: {
        policies?: [ 
          {
            periodSeconds?: int32(name='PeriodSeconds', description='检查执行的周期，取值范围[0, 1800]，单位为秒。', example='15'),
            type?: string(name='Type', description='策略类型，可为Pods或Percent。', example='Pods'),
            value?: string(name='Value', description='弹性行为的策略值，大于零的整数。若策略类型为Pods，则该值表示Pods数量；若策略类型为Percent，则该值表示百分比，允许超过100%。', example='10'),
          }
        ](name='Policies', description='策略配置。'),
        selectPolicy?: string(name='SelectPolicy', description='弹性扩容步长策略，可选值Max、Min、Disable。', example='Max'),
        stabilizationWindowSeconds?: int32(name='StabilizationWindowSeconds', description='扩容冷却时间。取值范围[0, 3600]，单位为秒。默认为0秒。', example='0'),
      }(name='ScaleUp', description='弹性扩容行为配置。'),
    }(name='Behaviour'),
    createTime?: long(name='CreateTime', description='The timestamp when the auto scaling policy was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='23212323123'),
    lastDisableTime?: long(name='LastDisableTime', description='The timestamp when the auto scaling policy was last disabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='23212323123'),
    maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
    metric?: {
      maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
      metrics?: [ 
        {
          metricTargetAverageUtilization?: int32(name='MetricTargetAverageUtilization', description='This parameter is deprecated.', example='1'),
          metricType?: string(name='MetricType', description='This parameter is deprecated.', example='cpu'),
        }
      ](name='Metrics', description='This parameter is deprecated.'),
      minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
    }(name='Metric', description='This parameter is deprecated.'),
    minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
    scaleRuleEnabled?: boolean(name='ScaleRuleEnabled', description='Indicates whether the auto scaling policy is enabled. Valid values:

*   **true**: The auto scaling policy is enabled.
*   **false**: The auto scaling policy is disabled.', example='true'),
    scaleRuleName?: string(name='ScaleRuleName', description='The name of the auto scaling policy.', example='cpu'),
    scaleRuleType?: string(name='ScaleRuleType', description='The type of the auto scaling policy. The value is trigger.', example='trigger'),
    trigger?: {
      maxReplicas?: int32(name='MaxReplicas', description='The maximum number of replicas. The maximum value is 1000.', example='122'),
      minReplicas?: int32(name='MinReplicas', description='The minimum number of replicas. The minimum value is 0.', example='2'),
      triggers?: [ 
        {
          metaData?: string(name='MetaData', description='The metadata of the trigger.', example='{"dryRun":true}'),
          name?: string(name='Name', description='The name of the trigger.', example='cpu'),
          type?: string(name='Type', description='The type of the trigger. Valid values: cron and app_metric.', example='cron'),
        }
      ](name='Triggers', description='The list of triggers.'),
    }(name='Trigger', description='The configurations of the trigger.'),
    updateTime?: long(name='UpdateTime', description='The timestamp when the auto scaling policy was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='23212323123'),
  }(name='AppScalingRule', description='The information about the auto scaling policy.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
}

model CreateApplicationScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateApplicationScalingRuleResponseBody(name='body'),
}

/**
 * @summary Creates an auto scaling policy for an application.
 *
 * @param request CreateApplicationScalingRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateApplicationScalingRuleResponse
 */
async function createApplicationScalingRuleWithOptions(request: CreateApplicationScalingRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateApplicationScalingRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.scalingBehaviour)) {
    query['ScalingBehaviour'] = request.scalingBehaviour;
  }
  if (!Util.isUnset(request.scalingRuleEnable)) {
    query['ScalingRuleEnable'] = request.scalingRuleEnable;
  }
  if (!Util.isUnset(request.scalingRuleMetric)) {
    query['ScalingRuleMetric'] = request.scalingRuleMetric;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }
  if (!Util.isUnset(request.scalingRuleTimer)) {
    query['ScalingRuleTimer'] = request.scalingRuleTimer;
  }
  if (!Util.isUnset(request.scalingRuleTrigger)) {
    query['ScalingRuleTrigger'] = request.scalingRuleTrigger;
  }
  if (!Util.isUnset(request.scalingRuleType)) {
    query['ScalingRuleType'] = request.scalingRuleType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateApplicationScalingRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v1/eam/scale/application_scaling_rule`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an auto scaling policy for an application.
 *
 * @param request CreateApplicationScalingRuleRequest
 * @return CreateApplicationScalingRuleResponse
 */
async function createApplicationScalingRule(request: CreateApplicationScalingRuleRequest): CreateApplicationScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createApplicationScalingRuleWithOptions(request, headers, runtime);
}

model CreateConfigTemplateRequest {
  content?: string(name='Content', description='The content of the configuration template. The value must be in the format that is specified by the Format parameter.', example='[{"Key":"name","Value":"william"},{"Key":"age","Value":"12"}]'),
  description?: string(name='Description', description='The description of the configuration template. The description can be up to 255 characters in length.', example='My configuration template'),
  format?: string(name='Format', description='The data format of the configuration template. Valid values:

*   JSON: JSON format
*   XML: XML format
*   YAML: YAML format
*   Properties: .properties format
*   KeyValue: key-value pairs
*   Custom: custom format', example='JSON'),
  name?: string(name='Name', description='The name of the configuration template. The name can be up to 64 characters in length.', example='my-template'),
}

model CreateConfigTemplateResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    id?: long(name='Id', description='The ID of the template.', example='125122'),
  }(name='Data', description='The data returned.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-****************'),
}

model CreateConfigTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateConfigTemplateResponseBody(name='body'),
}

/**
 * @summary Creates a configuration template.
 *
 * @param request CreateConfigTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateConfigTemplateResponse
 */
async function createConfigTemplateWithOptions(request: CreateConfigTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateConfigTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.content)) {
    body['Content'] = request.content;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.format)) {
    body['Format'] = request.format;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateConfigTemplate',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/config_template`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a configuration template.
 *
 * @param request CreateConfigTemplateRequest
 * @return CreateConfigTemplateResponse
 */
async function createConfigTemplate(request: CreateConfigTemplateRequest): CreateConfigTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createConfigTemplateWithOptions(request, headers, runtime);
}

model CreateIDCImportCommandRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID. You can call the ListCluster operation to query the cluster ID. For more information, see [ListCluster](https://help.aliyun.com/document_detail/154995.html).

This parameter is required.', example='7246cxxx-53xx-xxxx-xxxx-xxxxxxxx'),
}

model CreateIDCImportCommandResponseBody = {
  code?: string(name='Code', description='The HTTP status code.', example='200'),
  data?: string(name='Data', description='The generated import command.', example='wget -q -O /tmp/install.sh http://edas-hz.oss-cn-hangzhou-internal.aliyuncs.com/install.sh && sh /tmp/install.sh -idcToken xxxx-xxxxx-xxxxx-xxxxxxx -edasId xxxxxxxxxxxxxx'),
  message?: string(name='Message', description='The returned message.', example='success'),
  requestId?: string(name='RequestId', description='The request ID.', example='b197-40ab-9155-7ca7'),
}

model CreateIDCImportCommandResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateIDCImportCommandResponseBody(name='body'),
}

/**
 * @summary Generates a command that is used to import instances to a hybrid cloud Elastic Compute Service (ECS) cluster.
 *
 * @description ## Description
 * You must call the CreateIDCImportCommand operation first to generate a command used to import hybrid cloud ECS instances to a hybrid cloud ECS cluster. Then, run this command on the instances to import the instances to the cluster.
 *
 * @param request CreateIDCImportCommandRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateIDCImportCommandResponse
 */
async function createIDCImportCommandWithOptions(request: CreateIDCImportCommandRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateIDCImportCommandResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    body['ClusterId'] = request.clusterId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateIDCImportCommand',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/create_idc_import_command`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Generates a command that is used to import instances to a hybrid cloud Elastic Compute Service (ECS) cluster.
 *
 * @description ## Description
 * You must call the CreateIDCImportCommand operation first to generate a command used to import hybrid cloud ECS instances to a hybrid cloud ECS cluster. Then, run this command on the instances to import the instances to the cluster.
 *
 * @param request CreateIDCImportCommandRequest
 * @return CreateIDCImportCommandResponse
 */
async function createIDCImportCommand(request: CreateIDCImportCommandRequest): CreateIDCImportCommandResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createIDCImportCommandWithOptions(request, headers, runtime);
}

model CreateK8sConfigMapRequest {
  clusterId?: string(name='ClusterId', description='The ID of the Kubernetes cluster.', example='b07c8192-****-adf4f7447720'),
  data?: map[string]any(name='Data', description='The data of the ConfigMap. The value must be a JSON array string.', example='[{"Key":"name","Value":"william"},{"Key":"age","Value":"12"}]'),
  name?: string(name='Name', description='The name of the ConfigMap. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length.', example='my-configmap'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
}

model CreateK8sConfigMapResponseBody = {
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The additional information returned.', example='success'),
  requestId?: string(name='RequestId', description='The request ID.', example='D16979DC-4D42-**************'),
}

model CreateK8sConfigMapResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateK8sConfigMapResponseBody(name='body'),
}

/**
 * @summary Creates a Kubernetes ConfigMap.
 *
 * @param request CreateK8sConfigMapRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateK8sConfigMapResponse
 */
async function createK8sConfigMapWithOptions(request: CreateK8sConfigMapRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateK8sConfigMapResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    body['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    body['Namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateK8sConfigMap',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_config_map`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a Kubernetes ConfigMap.
 *
 * @param request CreateK8sConfigMapRequest
 * @return CreateK8sConfigMapResponse
 */
async function createK8sConfigMap(request: CreateK8sConfigMapRequest): CreateK8sConfigMapResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createK8sConfigMapWithOptions(request, headers, runtime);
}

model CreateK8sIngressRuleRequest {
  annotations?: string(name='Annotations', description='The annotations.', example='{\\\\"alb.ingress.kubernetes.io/rewrite-target\\\\":\\\\"/consumer-echo/test\\\\"}'),
  clusterId?: string(name='ClusterId', description='The ID of the Kubernetes cluster.

This parameter is required.', example='5b2b4ab4-efbc-4a81-9c45-xxxxxxxxxxxxx'),
  ingressConf?: map[string]any(name='IngressConf', description='The routing rules of the Ingress. Set this parameter to a JSON string in the following format:

    {
      "rules": [
        {
          "host": "abc.com",
          "secretName": "tls-secret",
          "paths": [
            {
              "path": "/path",
              "backend": {
                "servicePort": 80,
                "serviceName": "xxx"
              }
            }
          ]
        }
      ]
    }

Parameter description:

*   rules: the list of routing rules.
*   host: the domain name to be accessed.
*   secretName: the name of the Secret that stores the information about the Transport Layer Security (TLS) certificate. The certificate is required if you need to use the HTTPS protocol.
*   paths: the list of paths to be accessed.
*   path: the path to be accessed.
*   backend: the configuration of the backend service. You can specify a service that is created in the Enterprise Distributed Application Service (EDAS) console.
*   serviceName: the name of the backend service.
*   servicePort: the port of the backend service.', example='{"rules":[{"host":"abc.com","secretName":"tls-secret","paths":[{"path":"/path","backend":{"servicePort":80,"serviceName":"xxx"}}]}]}'),
  labels?: string(name='Labels', description='The labels.', example='{\\\\"test-labels\\\\":\\\\"test-value\\\\"}'),
  name?: string(name='Name', description='The name of the Ingress. The name can contain lowercase letters, digits, and hyphens (-). It must start with a lowercase letter but cannot end with a hyphen (-). The name can be up to 63 characters in length.

This parameter is required.', example='my-ingress-rule'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.

This parameter is required.', example='default'),
}

model CreateK8sIngressRuleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
}

model CreateK8sIngressRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateK8sIngressRuleResponseBody(name='body'),
}

/**
 * @summary Creates an Ingress.
 *
 * @param request CreateK8sIngressRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateK8sIngressRuleResponse
 */
async function createK8sIngressRuleWithOptions(request: CreateK8sIngressRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateK8sIngressRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.annotations)) {
    query['Annotations'] = request.annotations;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ingressConf)) {
    query['IngressConf'] = request.ingressConf;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateK8sIngressRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_ingress`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an Ingress.
 *
 * @param request CreateK8sIngressRuleRequest
 * @return CreateK8sIngressRuleResponse
 */
async function createK8sIngressRule(request: CreateK8sIngressRuleRequest): CreateK8sIngressRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createK8sIngressRuleWithOptions(request, headers, runtime);
}

model CreateK8sSecretRequest {
  base64Encoded?: boolean(name='Base64Encoded', description='Specifies whether the data has been encoded in Base64. Valid values: true and false.', example='true'),
  certId?: string(name='CertId', description='The certificate ID provided by Alibaba Cloud Certificate Management Service.', example='6651483'),
  certRegionId?: string(name='CertRegionId', description='The region in which the certificate is stored.', example='cn-hangzhou'),
  clusterId?: string(name='ClusterId', description='The cluster ID.', example='712082c3-****-****-9217-a947b5cde6ee'),
  data?: string(name='Data', description='The data of the Secret. The value must be a JSON array that contains the following information:

*   Key: Secret key
*   Value: Secret value', example='[{"Key":"name","Value":"william"},{"Key":"age","Value":"12"}]'),
  name?: string(name='Name', description='The name of the Secret. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length.', example='my-secret'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
  type?: string(name='Type', description='The Secret type. Valid values:

*   Opaque: user-defined data
*   kubernetes.io/tls: Transport Layer Security (TLS) certificate', example='Opaque'),
}

model CreateK8sSecretResponseBody = {
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The additional information returned.', example='success'),
  requestId?: string(name='RequestId', description='The request ID.', example='4D9F-DR94-FD****************'),
}

model CreateK8sSecretResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateK8sSecretResponseBody(name='body'),
}

/**
 * @summary Creates a Kubernetes Secret.
 *
 * @param request CreateK8sSecretRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateK8sSecretResponse
 */
async function createK8sSecretWithOptions(request: CreateK8sSecretRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateK8sSecretResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.base64Encoded)) {
    body['Base64Encoded'] = request.base64Encoded;
  }
  if (!Util.isUnset(request.certId)) {
    body['CertId'] = request.certId;
  }
  if (!Util.isUnset(request.certRegionId)) {
    body['CertRegionId'] = request.certRegionId;
  }
  if (!Util.isUnset(request.clusterId)) {
    body['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    body['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateK8sSecret',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_secret`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a Kubernetes Secret.
 *
 * @param request CreateK8sSecretRequest
 * @return CreateK8sSecretResponse
 */
async function createK8sSecret(request: CreateK8sSecretRequest): CreateK8sSecretResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createK8sSecretWithOptions(request, headers, runtime);
}

model CreateK8sServiceRequest {
  appId?: string(name='AppId', description='The application ID.

This parameter is required.', example='5a166fbd-****-****-a286-781659d9f54c'),
  externalTrafficPolicy?: string(name='ExternalTrafficPolicy', description='The policy used for external traffic management. Valid values:

*   Local: The network traffic can be routed to pods on the node where the Service is deployed.
*   Cluster: The network traffic can be routed to pods on other nodes in the cluster.

Default value: Local.', example='Local'),
  name?: string(name='Name', description='The name of the Kubernetes Service.

This parameter is required.', example='service-http'),
  servicePorts?: string(name='ServicePorts', description='The port mapping of the Kubernetes Service. Set this parameter to a JSON array. The following parameters are included in the configurations:

*   **protocol**: the protocol used by the Service. Valid values: TCP and UDP. This parameter is mandatory.
*   **port**: the frontend service port. Valid values: 1 to 65535. This parameter is mandatory.
*   **targetPort**: the backend container port. Valid values: 1 to 65535. This parameter is mandatory.

Example: `[{"protocol": "TCP", "port": 80, "targetPort": 8080},{"protocol": "TCP", "port": 81, "targetPort": 8081}]`

This parameter is required.', example='[{"protocol":"TCP","port":80,"targetPort":8080}]'),
  type?: string(name='Type', description='The type of the Kubernetes Service. Set the value to ClusterIP.

This parameter is required.', example='ClusterIP'),
}

model CreateK8sServiceResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The change process ID.', example='b4b37bde-a125-****-****-741f7f4a9ae3'),
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The additional information returned.', example='success'),
  requestId?: string(name='RequestId', description='The request ID.', example='4823-bhjf-23u4-eiufh'),
}

model CreateK8sServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateK8sServiceResponseBody(name='body'),
}

/**
 * @summary Creates an application service in a Kubernetes cluster.
 *
 * @param request CreateK8sServiceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateK8sServiceResponse
 */
async function createK8sServiceWithOptions(request: CreateK8sServiceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateK8sServiceResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.externalTrafficPolicy)) {
    query['ExternalTrafficPolicy'] = request.externalTrafficPolicy;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.servicePorts)) {
    query['ServicePorts'] = request.servicePorts;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateK8sService',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_service`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an application service in a Kubernetes cluster.
 *
 * @param request CreateK8sServiceRequest
 * @return CreateK8sServiceResponse
 */
async function createK8sService(request: CreateK8sServiceRequest): CreateK8sServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createK8sServiceWithOptions(request, headers, runtime);
}

model DeleteApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-*********'),
}

model DeleteApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='0b8e3c0b-5818-430*************'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='34DFE9FDV****************'),
}

model DeleteApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApplicationResponseBody(name='body'),
}

/**
 * @summary Deletes an application.
 *
 * @param request DeleteApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteApplicationResponse
 */
async function deleteApplicationWithOptions(request: DeleteApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_delete_app`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an application.
 *
 * @param request DeleteApplicationRequest
 * @return DeleteApplicationResponse
 */
async function deleteApplication(request: DeleteApplicationRequest): DeleteApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteApplicationWithOptions(request, headers, runtime);
}

model DeleteApplicationScalingRuleRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='78194c76-3dca-418e-a263-cccd1ab4****'),
  scalingRuleName?: string(name='ScalingRuleName', description='The name of the auto scaling policy.', example='cpu-trigger'),
}

model DeleteApplicationScalingRuleResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='5d6fa0bc-cc3**********'),
}

model DeleteApplicationScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApplicationScalingRuleResponseBody(name='body'),
}

/**
 * @summary Deletes an auto scaling policy for an application.
 *
 * @param request DeleteApplicationScalingRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteApplicationScalingRuleResponse
 */
async function deleteApplicationScalingRuleWithOptions(request: DeleteApplicationScalingRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteApplicationScalingRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApplicationScalingRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v1/eam/scale/application_scaling_rule`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an auto scaling policy for an application.
 *
 * @param request DeleteApplicationScalingRuleRequest
 * @return DeleteApplicationScalingRuleResponse
 */
async function deleteApplicationScalingRule(request: DeleteApplicationScalingRuleRequest): DeleteApplicationScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteApplicationScalingRuleWithOptions(request, headers, runtime);
}

model DeleteClusterRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='8b96ade0-0a07-****-af9d-5ed83640d076'),
  mode?: int32(name='Mode', description='The type of the cluster ID. Valid values:

*   0: specifies the ID of the cluster in Enterprise Distributed Application Service (EDAS).
*   1: specifies the ID of the ACK cluster.', example='0'),
}

model DeleteClusterResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: boolean(name='Data', description='Indicates whether the cluster is deleted. Valid values:

*   true: The cluster is deleted.
*   false: The cluster is not deleted.', example='true'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='856D4438-****-4EA9-****-894628C0434E'),
}

model DeleteClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterResponseBody(name='body'),
}

/**
 * @summary Deletes an Elastic Compute Service (ECS) cluster or cancels the import of a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request DeleteClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterResponse
 */
async function deleteClusterWithOptions(request: DeleteClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteClusterResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.mode)) {
    query['Mode'] = request.mode;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCluster',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/cluster`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an Elastic Compute Service (ECS) cluster or cancels the import of a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request DeleteClusterRequest
 * @return DeleteClusterResponse
 */
async function deleteCluster(request: DeleteClusterRequest): DeleteClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteClusterWithOptions(request, headers, runtime);
}

model DeleteClusterMemberRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='52984524-****-****-85f2-a34b0e5bb521'),
  clusterMemberId?: string(name='ClusterMemberId', description='The member ID of the ECS instance that you want to remove from the cluster.

This parameter is required.', example='i-2zej4i2jdf3****jigng'),
}

model DeleteClusterMemberResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: boolean(name='Data', description='Indicates whether the request is successful.', example='true'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
}

model DeleteClusterMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterMemberResponseBody(name='body'),
}

/**
 * @summary Removes an Elastic Compute Service (ECS) instance from a cluster.
 *
 * @param request DeleteClusterMemberRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterMemberResponse
 */
async function deleteClusterMemberWithOptions(request: DeleteClusterMemberRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteClusterMemberResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterMemberId)) {
    query['ClusterMemberId'] = request.clusterMemberId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteClusterMember',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/cluster_member`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes an Elastic Compute Service (ECS) instance from a cluster.
 *
 * @param request DeleteClusterMemberRequest
 * @return DeleteClusterMemberResponse
 */
async function deleteClusterMember(request: DeleteClusterMemberRequest): DeleteClusterMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteClusterMemberWithOptions(request, headers, runtime);
}

model DeleteConfigTemplateRequest {
  id?: long(name='Id', description='The ID of the configuration template.', example='555'),
}

model DeleteConfigTemplateResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-************'),
}

model DeleteConfigTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteConfigTemplateResponseBody(name='body'),
}

/**
 * @summary Deletes a configuration template.
 *
 * @param request DeleteConfigTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteConfigTemplateResponse
 */
async function deleteConfigTemplateWithOptions(request: DeleteConfigTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteConfigTemplateResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteConfigTemplate',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/config_template`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a configuration template.
 *
 * @param request DeleteConfigTemplateRequest
 * @return DeleteConfigTemplateResponse
 */
async function deleteConfigTemplate(request: DeleteConfigTemplateRequest): DeleteConfigTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteConfigTemplateWithOptions(request, headers, runtime);
}

model DeleteDeployGroupRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='3616cdca-4f92-4413-b31*************'),
  groupName?: string(name='GroupName', description='The name of the instance group.

This parameter is required.', example='test'),
}

model DeleteDeployGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='The data that is returned.', example='1'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4D9F-DR94-FD****************'),
}

model DeleteDeployGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDeployGroupResponseBody(name='body'),
}

/**
 * @summary Deletes an instance group for an application.
 *
 * @param request DeleteDeployGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDeployGroupResponse
 */
async function deleteDeployGroupWithOptions(request: DeleteDeployGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteDeployGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDeployGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/deploy_group`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an instance group for an application.
 *
 * @param request DeleteDeployGroupRequest
 * @return DeleteDeployGroupResponse
 */
async function deleteDeployGroup(request: DeleteDeployGroupRequest): DeleteDeployGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteDeployGroupWithOptions(request, headers, runtime);
}

model DeleteEcuRequest {
  ecuId?: string(name='EcuId', description='The unique ID of the ECU to be deleted.

This parameter is required.', example='5c0b8c82-4ba9-****-****-130a34ffa534'),
}

model DeleteEcuResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='The returned data that indicates whether the ECU is deleted. A value of `OK` indicates that the ECU is deleted.', example='OK'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='fb08fd29-b197-40ab-****-****'),
}

model DeleteEcuResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteEcuResponseBody(name='body'),
}

/**
 * @summary Deletes an Elastic Compute Unit (ECU).
 *
 * @param request DeleteEcuRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteEcuResponse
 */
async function deleteEcuWithOptions(request: DeleteEcuRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteEcuResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.ecuId)) {
    query['EcuId'] = request.ecuId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEcu',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/delete_ecu`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an Elastic Compute Unit (ECU).
 *
 * @param request DeleteEcuRequest
 * @return DeleteEcuResponse
 */
async function deleteEcu(request: DeleteEcuRequest): DeleteEcuResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteEcuWithOptions(request, headers, runtime);
}

model DeleteK8sApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application that you want to delete. You can call the ListApplication operation to query the application ID.

This parameter is required.', example='dbac7e3c-****-49bc-b6de-ffc550018b45'),
  force?: boolean(name='Force', description='Specifies whether to forcibly delete the application and disable application deletion protection.', example='true'),
}

model DeleteK8sApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process for this operation. If an instance on which the application is deployed is running or a Server Load Balancer (SLB) instance is bound to the application, this operation generates a change process ID and deletes the application. You can call the GetChangeOrderInfo operation to query the progress of this operation. You can determine whether the operation is successful based on the value of the Code parameter.', example='0a34531a-****-49dc-8e7f-0cbbbfa12cf0'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323******'),
}

model DeleteK8sApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteK8sApplicationResponseBody(name='body'),
}

/**
 * @summary Deletes an application from a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request DeleteK8sApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteK8sApplicationResponse
 */
async function deleteK8sApplicationWithOptions(request: DeleteK8sApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteK8sApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.force)) {
    query['Force'] = request.force;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteK8sApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_apps`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an application from a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request DeleteK8sApplicationRequest
 * @return DeleteK8sApplicationResponse
 */
async function deleteK8sApplication(request: DeleteK8sApplicationRequest): DeleteK8sApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteK8sApplicationWithOptions(request, headers, runtime);
}

model DeleteK8sConfigMapRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='51e37e91-6403-423a-9913-f236aa7a6a50'),
  name?: string(name='Name', description='The name of the ConfigMap. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length.

This parameter is required.', example='my-configmap'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.

This parameter is required.', example='default'),
}

model DeleteK8sConfigMapResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-************'),
}

model DeleteK8sConfigMapResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteK8sConfigMapResponseBody(name='body'),
}

/**
 * @summary Deletes a Kubernetes ConfigMap.
 *
 * @param request DeleteK8sConfigMapRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteK8sConfigMapResponse
 */
async function deleteK8sConfigMapWithOptions(request: DeleteK8sConfigMapRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteK8sConfigMapResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteK8sConfigMap',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_config_map`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a Kubernetes ConfigMap.
 *
 * @param request DeleteK8sConfigMapRequest
 * @return DeleteK8sConfigMapResponse
 */
async function deleteK8sConfigMap(request: DeleteK8sConfigMapRequest): DeleteK8sConfigMapResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteK8sConfigMapWithOptions(request, headers, runtime);
}

model DeleteK8sIngressRuleRequest {
  clusterId?: string(name='ClusterId', description='The ID of the Kubernetes cluster.', example='5b2b4ab4-efbc-4a81-9c45-xxxxxxxxxxxxx'),
  name?: string(name='Name', description='The name of the Ingress. The name can contain lowercase letters, digits, and hyphens (-). It must start with a lowercase letter but cannot end with a hyphen (-). The name can be up to 63 characters in length.', example='my-ingress-rule'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
}

model DeleteK8sIngressRuleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
}

model DeleteK8sIngressRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteK8sIngressRuleResponseBody(name='body'),
}

/**
 * @summary Deletes an ingress.
 *
 * @param request DeleteK8sIngressRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteK8sIngressRuleResponse
 */
async function deleteK8sIngressRuleWithOptions(request: DeleteK8sIngressRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteK8sIngressRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteK8sIngressRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_ingress`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an ingress.
 *
 * @param request DeleteK8sIngressRuleRequest
 * @return DeleteK8sIngressRuleResponse
 */
async function deleteK8sIngressRule(request: DeleteK8sIngressRuleRequest): DeleteK8sIngressRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteK8sIngressRuleWithOptions(request, headers, runtime);
}

model DeleteK8sSecretRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='2b3a1013-31c7-433b-8fe7-3895d838b824'),
  name?: string(name='Name', description='The name of the Secret. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length.

This parameter is required.', example='my-secret'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.

This parameter is required.', example='default'),
}

model DeleteK8sSecretResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-*************'),
}

model DeleteK8sSecretResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteK8sSecretResponseBody(name='body'),
}

/**
 * @summary Deletes a Kubernetes Secret.
 *
 * @param request DeleteK8sSecretRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteK8sSecretResponse
 */
async function deleteK8sSecretWithOptions(request: DeleteK8sSecretRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteK8sSecretResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteK8sSecret',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_secret`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a Kubernetes Secret.
 *
 * @param request DeleteK8sSecretRequest
 * @return DeleteK8sSecretResponse
 */
async function deleteK8sSecret(request: DeleteK8sSecretRequest): DeleteK8sSecretResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteK8sSecretWithOptions(request, headers, runtime);
}

model DeleteK8sServiceRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='5a166fbd***a286-781659d9f54c'),
  name?: string(name='Name', description='The name of the service.

This parameter is required.', example='service-http'),
}

model DeleteK8sServiceResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='b4b37bde-a125-43fc-****-741f7f4a9ae3'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9041389c-*****-459c-8253-724bca7f51f0'),
}

model DeleteK8sServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteK8sServiceResponseBody(name='body'),
}

/**
 * @summary Deletes an application service from a Kubernetes cluster.
 *
 * @param request DeleteK8sServiceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteK8sServiceResponse
 */
async function deleteK8sServiceWithOptions(request: DeleteK8sServiceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteK8sServiceResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteK8sService',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_service`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an application service from a Kubernetes cluster.
 *
 * @param request DeleteK8sServiceRequest
 * @return DeleteK8sServiceResponse
 */
async function deleteK8sService(request: DeleteK8sServiceRequest): DeleteK8sServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteK8sServiceWithOptions(request, headers, runtime);
}

model DeleteLogPathRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-4f92-4413**********'),
  path?: string(name='Path', description='The absolute path of the log directory that you want to remove. The value must start and end with a forward slash (`/`) and must contain `/log` or `/logs`. The following directories are the default log directories in Enterprise Distributed Application Service (EDAS):

*   /home/admin/edas-container/logs/
*   /home/admin/taobao-tomcat-7.0.59/logs/
*   /home/admin/taobao-tomcat-production-7.0.59.3/logs/
*   /home/admin/taobao-tomcat-production-7.0.70/logs/
*   /home/admin/edas-agent/logs/', example='/temp/log/'),
}

model DeleteLogPathResponseBody = {
  code?: string(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='3616cdca-4f92-4413**********'),
}

model DeleteLogPathResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteLogPathResponseBody(name='body'),
}

/**
 * @summary Removes a log directory from an application. This operation is applicable to applications that are deployed in Alibaba Cloud Elastic Compute Service (ECS) clusters and hybrid cloud ECS clusters.
 *
 * @param request DeleteLogPathRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteLogPathResponse
 */
async function deleteLogPathWithOptions(request: DeleteLogPathRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteLogPathResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.path)) {
    query['Path'] = request.path;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLogPath',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/log/popListLogDirs`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes a log directory from an application. This operation is applicable to applications that are deployed in Alibaba Cloud Elastic Compute Service (ECS) clusters and hybrid cloud ECS clusters.
 *
 * @param request DeleteLogPathRequest
 * @return DeleteLogPathResponse
 */
async function deleteLogPath(request: DeleteLogPathRequest): DeleteLogPathResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteLogPathWithOptions(request, headers, runtime);
}

model DeleteRoleRequest {
  roleId?: int32(name='RoleId', description='The ID of the RAM role.

This parameter is required.', example='99999999'),
}

model DeleteRoleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='042F329B-F518-4CC1-****-**********'),
}

model DeleteRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRoleResponseBody(name='body'),
}

/**
 * @summary Deletes a Resource Access Management (RAM) role.
 *
 * @param request DeleteRoleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRoleResponse
 */
async function deleteRoleWithOptions(request: DeleteRoleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteRoleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteRole',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/delete_role`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a Resource Access Management (RAM) role.
 *
 * @param request DeleteRoleRequest
 * @return DeleteRoleResponse
 */
async function deleteRole(request: DeleteRoleRequest): DeleteRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteRoleWithOptions(request, headers, runtime);
}

model DeleteServiceGroupRequest {
  groupId?: string(name='GroupId', description='The ID of the service group that you want to delete.

This parameter is required.', example='789d9cda-74b1-****-****-05e21a0a7661'),
}

model DeleteServiceGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='ECD1D6FC-4307-4583-BA6F-215F38****'),
}

model DeleteServiceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteServiceGroupResponseBody(name='body'),
}

/**
 * @summary Deletes a service group.
 *
 * @param request DeleteServiceGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteServiceGroupResponse
 */
async function deleteServiceGroupWithOptions(request: DeleteServiceGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteServiceGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteServiceGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/service/serviceGroups`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a service group.
 *
 * @param request DeleteServiceGroupRequest
 * @return DeleteServiceGroupResponse
 */
async function deleteServiceGroup(request: DeleteServiceGroupRequest): DeleteServiceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteServiceGroupWithOptions(request, headers, runtime);
}

model DeleteSwimmingLaneRequest {
  laneId?: long(name='LaneId', description='The ID of the lane.

This parameter is required.', example='241'),
}

model DeleteSwimmingLaneResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: int32(name='Data', description='Indicates whether the lane is deleted.', example='1'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4264F69C-686C-4107-B493-0599C8d1****'),
}

model DeleteSwimmingLaneResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteSwimmingLaneResponseBody(name='body'),
}

/**
 * @summary Deletes a lane.
 *
 * @param request DeleteSwimmingLaneRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteSwimmingLaneResponse
 */
async function deleteSwimmingLaneWithOptions(request: DeleteSwimmingLaneRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteSwimmingLaneResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.laneId)) {
    query['LaneId'] = request.laneId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSwimmingLane',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/trafficmgnt/swimming_lanes`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a lane.
 *
 * @param request DeleteSwimmingLaneRequest
 * @return DeleteSwimmingLaneResponse
 */
async function deleteSwimmingLane(request: DeleteSwimmingLaneRequest): DeleteSwimmingLaneResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteSwimmingLaneWithOptions(request, headers, runtime);
}

model DeleteUserDefineRegionRequest {
  id?: long(name='Id', description='The unique ID of the custom namespace. You can call the ListUserDefineRegion operation to query the ID. For more information, see [ListUserDefineRegion](https://help.aliyun.com/document_detail/149377.html).', example='2564'),
  regionTag?: string(name='RegionTag', description='The tag of the custom namespace.', example='regiontag'),
}

model DeleteUserDefineRegionResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  regionDefine?: {
    belongRegion?: string(name='BelongRegion', description='The ID of the region to which the custom namespace belongs.', example='cn-beijing'),
    description?: string(name='Description', description='The description of the custom namespace.', example='logic region'),
    id?: long(name='Id', description='The unique identifier of the custom namespace.', example='8848'),
    regionId?: string(name='RegionId', description='The ID of the custom namespace. The ID cannot be changed after the custom namespace is created. The format is `region ID:custom namespace ID`.', example='cn-beijing:test'),
    regionName?: string(name='RegionName', description='The name of the custom namespace.', example='test_region'),
    userId?: string(name='UserId', description='The ID of the Alibaba Cloud account to which the custom namespace belongs.', example='11727****22398'),
  }(name='RegionDefine', description='The custom namespace.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='1234-1sda-321d-****'),
}

model DeleteUserDefineRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserDefineRegionResponseBody(name='body'),
}

/**
 * @summary Deletes a specified custom namespace.
 *
 * @param request DeleteUserDefineRegionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserDefineRegionResponse
 */
async function deleteUserDefineRegionWithOptions(request: DeleteUserDefineRegionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteUserDefineRegionResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.regionTag)) {
    query['RegionTag'] = request.regionTag;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUserDefineRegion',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/user_region_def`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a specified custom namespace.
 *
 * @param request DeleteUserDefineRegionRequest
 * @return DeleteUserDefineRegionResponse
 */
async function deleteUserDefineRegion(request: DeleteUserDefineRegionRequest): DeleteUserDefineRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteUserDefineRegionWithOptions(request, headers, runtime);
}

model DeployApplicationRequest {
  appEnv?: string(name='AppEnv', description='The environment variables of the application. Specify each environment variable by using two key-value pairs. Example: `{"name":"x","value":"y"},{"name":"x2","value":"y2"}`. The `keys` of the two key-value pairs are `name` and `value`.', example='[{\\\\"name\\\\":\\\\"env_name_1\\\\", \\\\"value\\\\":\\\\"env_value_1\\\\"}, {\\\\"name\\\\":\\\\"env_name_2\\\\",\\\\"value\\\\":\\\\"env_value_2\\\\"}]'),
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/423162.html).

This parameter is required.', example='3616cdca-********************'),
  batch?: int32(name='Batch', description='The number of batches per instance group.

*   If you specify an ID when you set the GroupId parameter, the application is deployed to the specified instance group. The minimum number of batches that can be specified is 1. The maximum number of batches is the maximum number of ECS instances in the Normal state in the instance group. The actual value falls in the range of [1, specified number]. The specified number of batches equals the number of ECS instances in the specified instance group.
*   If you set the GroupId parameter to all, the application is deployed to all instance groups. The minimum number of batches that can be specified is 1. The maximum number of batches is the number of ECS instances in the instance group that has the largest number of ECS instances in the Normal state.', example='1'),
  batchWaitTime?: int32(name='BatchWaitTime', description='The wait time between deployment batches for the application. Unit: minutes.

*   Default value: 0. If no wait time between deployment batches is needed, set this parameter to 0.
*   Maximum value: 5.

If many deployment batches are needed, we recommend that you specify a small value for this parameter. Otherwise, the application deployment is time-consuming.', example='0'),
  buildPackId?: long(name='BuildPackId', description='The build package number of EDAS Container.

*   You do not need to set the parameter if you do not need to change the EDAS Container version during the deployment.
*   Set the parameter if you need to update the EDAS Container version of the application during the deployment.

You can query the build package number by using one of the following methods:

*   Call the ListBuildPack operation. For more information, see [ListBuildPack](https://help.aliyun.com/document_detail/149391.html).
*   Obtain the value in the **Build package number** column of the [Release notes for EDAS Container](https://help.aliyun.com/document_detail/92614.html) topic. For example, `59` indicates `EDAS Container 3.5.8`.', example='59'),
  componentIds?: string(name='ComponentIds', description='The IDs of the components used by the application. The parameter is not applicable to High-Speed Framework (HSF) applications. You can call the ListComponents operation to query the component IDs. For more information, see [ListComponents](https://help.aliyun.com/document_detail/423223.html).

*   If you have specified the component IDs when you create the application, you do not need to set the parameter when you deploy the application.
*   Set the parameter if you need to update the component versions for the application during the deployment.

Valid values for common application components:

*   4: Apache Tomcat 7.0.91
*   7: Apache Tomcat 8.5.42
*   5: OpenJDK 1.8.x
*   6: OpenJDK 1.7.x

For more information, see the Common application parameters section of the [InsertApplication](https://help.aliyun.com/document_detail/423185.html) topic.', example='7'),
  deployType?: string(name='DeployType', description='The deployment mode of the application. Valid values: `url` and `image`. The image value is deprecated. You can deploy an application to a Swarm cluster only by using an image.``

This parameter is required.', example='URL'),
  desc?: string(name='Desc', description='The description of the application deployment.', example='Deploy by edas pop api'),
  gray?: boolean(name='Gray', description='Specifies whether canary release is selected as the deployment method. Valid values:

*   true: Canary release is selected.

    *   To implement a canary release, specify the GroupId parameter, which specifies the ID of the instance group for the canary release.
    *   Canary release can be selected as the deployment method for only one batch.
    *   After the canary release is complete, the application is released in regular mode. The Batch parameter specifies the number of batches.

*   false: Single-batch release or phased release is selected.', example='true'),
  groupId?: string(name='GroupId', description='The ID of the instance group to which the application is deployed. You can call the ListDeployGroup operation to query the ID of the instance group. For more information, see [ListDeployGroup](https://help.aliyun.com/document_detail/423184.html).

Set the parameter to `all` if you want to deploy the application to all instance groups.

This parameter is required.', example='all'),
  imageUrl?: string(name='ImageUrl', description='The URL of the application image that is used to deploy the application in a Swarm cluster. We recommend that you use an image that is stored in Alibaba Cloud Container Registry. This parameter is deprecated.', example='registry.cn-hangzhou.aliyuncs.com/mw/testapp:latest'),
  packageVersion?: string(name='PackageVersion', description='The version of the application deployment package. The value can be up to 64 characters in length. We recommend that you use a timestamp.

This parameter is required.', example='1.0'),
  releaseType?: long(name='ReleaseType', description='The mode in which the deployment batches are triggered. Valid values:

*   0: automatic.
*   1: You must manually trigger the next batch. You can manually click **Proceed to Next Batch** in the console or call the ContinuePipeline operation to proceed to the next batch. We recommend that you choose the automatic mode when you call an API operation to deploy the application. For more information, see [ContinuePipeline](https://help.aliyun.com/document_detail/126990.html).', example='0'),
  trafficControlStrategy?: string(name='TrafficControlStrategy', description='The canary release policy. For more information about canary release policies, see [DeployK8sApplication](https://help.aliyun.com/document_detail/423212.html).', example='{"http":{"rules":[{"conditionType":"percent","percent":10}]}}'),
  warUrl?: string(name='WarUrl', description='The URL of the application deployment package. The package can be a WAR or JAR package. This parameter is required if you set the **DeployType** parameter to `url`. We recommend that you specify the URL of an application deployment package that is stored in an Object Storage Service (OSS) bucket.', example='https://edas.oss-cn-hangzhou.aliyuncs.com/demo/hello-edas.war'),
}

model DeployApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The change process ID of the application deployment.', example='adf86823-055b-48a4-a59f-fa5582******'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message returned for the request.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='d6834ee9-5045-*************'),
}

model DeployApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeployApplicationResponseBody(name='body'),
}

/**
 * @summary Deploys an application in an Elastic Compute Service (ECS) cluster.
 *
 * @description > To deploy an application in a Container Service for Kubernetes (ACK) cluster that is imported into Enterprise Distributed Application Service (EDAS), call the DeployK8sApplication operation provided by EDAS. For more information, see [](~~149420~~)DeployK8sApplication.
 *
 * @param request DeployApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeployApplicationResponse
 */
async function deployApplicationWithOptions(request: DeployApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeployApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appEnv)) {
    query['AppEnv'] = request.appEnv;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.batch)) {
    query['Batch'] = request.batch;
  }
  if (!Util.isUnset(request.batchWaitTime)) {
    query['BatchWaitTime'] = request.batchWaitTime;
  }
  if (!Util.isUnset(request.buildPackId)) {
    query['BuildPackId'] = request.buildPackId;
  }
  if (!Util.isUnset(request.componentIds)) {
    query['ComponentIds'] = request.componentIds;
  }
  if (!Util.isUnset(request.deployType)) {
    query['DeployType'] = request.deployType;
  }
  if (!Util.isUnset(request.desc)) {
    query['Desc'] = request.desc;
  }
  if (!Util.isUnset(request.gray)) {
    query['Gray'] = request.gray;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.imageUrl)) {
    query['ImageUrl'] = request.imageUrl;
  }
  if (!Util.isUnset(request.packageVersion)) {
    query['PackageVersion'] = request.packageVersion;
  }
  if (!Util.isUnset(request.releaseType)) {
    query['ReleaseType'] = request.releaseType;
  }
  if (!Util.isUnset(request.trafficControlStrategy)) {
    query['TrafficControlStrategy'] = request.trafficControlStrategy;
  }
  if (!Util.isUnset(request.warUrl)) {
    query['WarUrl'] = request.warUrl;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeployApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_deploy`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deploys an application in an Elastic Compute Service (ECS) cluster.
 *
 * @description > To deploy an application in a Container Service for Kubernetes (ACK) cluster that is imported into Enterprise Distributed Application Service (EDAS), call the DeployK8sApplication operation provided by EDAS. For more information, see [](~~149420~~)DeployK8sApplication.
 *
 * @param request DeployApplicationRequest
 * @return DeployApplicationResponse
 */
async function deployApplication(request: DeployApplicationRequest): DeployApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deployApplicationWithOptions(request, headers, runtime);
}

model DeployK8sApplicationRequest {
  annotations?: string(name='Annotations', description='The annotation of an application pod.', example='{"annotation-name-1":"annotation-value-1","annotation-name-2":"annotation-value-2"}'),
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='e83acea6-****-47e1-96ae-c0e953772cdc'),
  args?: string(name='Args', description='The argument array in the container start-up command. Set this parameter to a JSON array in the format of `["args1","args2"\\\\]`, where each key is set to a string. If you want to cancel this configuration, set this parameter to an empty JSON array in the format of `"[\\\\]"`.', example='["args1","args2"]'),
  batchTimeout?: int32(name='BatchTimeout', description='The timeout period for an at-a-time release. Unit: seconds.', example='60'),
  batchWaitTime?: int32(name='BatchWaitTime', description='The minimum time interval for the phased release of pods. For more information, see [minReadySeconds](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds).', example='0'),
  buildPackId?: string(name='BuildPackId', description='The build package number of EDAS Container.

*   You do not need to set the parameter if you do not need to change the EDAS Container version during the deployment.
*   Set the parameter if you need to update the EDAS Container version of the application during the deployment.

You can query the build package number by using one of the following methods:

*   Call the ListBuildPack operation. For more information, see [ListBuildPack](https://help.aliyun.com/document_detail/423222.html).
*   Obtain the value in the **Build package number** column of the [Release notes for EDAS Container](https://help.aliyun.com/document_detail/92614.html) topic. For example, `59` indicates `EDAS Container 3.5.8`.', example='59'),
  canaryRuleId?: string(name='CanaryRuleId'),
  changeOrderDesc?: string(name='ChangeOrderDesc', description='The description of the change process.', example='Upgrade'),
  command?: string(name='Command', description='The commands that you run to start the container.

> If you want to cancel this configuration, set this parameter to an empty string in the format of `""`.', example='ls'),
  configMountDescs?: string(name='ConfigMountDescs', description='The configuration for mounting a Kubernetes ConfigMap or Secret to a directory in an elastic container instance. The following parameters are included in the configuration:

*   name: the name of the Kubernetes ConfigMap or Secret.
*   type: the type of the API object that you want to mount. You can mount a Kubernetes ConfigMap or Secret.
*   mountPath: the mount path. The mount path must be an absolute path that starts with a forward slash (/).', example='[
      {
            "name": "nginx-config",
            "type": "ConfigMap",
            "mountPath": "/etc/nginx"
      },
      {
            "name": "tls-secret",
            "type": "Secret",
            "mountPath": "/etc/ssh"
      }
]'),
  cpuLimit?: int32(name='CpuLimit', description='The maximum number of CPU cores allowed for each application instance when the application is running. Unit: cores. Value 0 indicates that no limit is set on CPU cores.', example='1'),
  cpuRequest?: int32(name='CpuRequest', description='The number of CPU cores requested for each application instance when the application is running. Unit: cores. We recommend that you set this parameter. Value 0 indicates that no limit is set on CPU cores.

> You must set this parameter together with the CpuLimit parameter. Make sure that the value of this parameter does not exceed that of the CpuLimit parameter.', example='0'),
  customAffinity?: string(name='CustomAffinity', description='The affinity configuration of the pod. This parameter takes effect only if both the DeployAcrossNodes and DeployAcrossZones parameters are set to false.', example='{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"beta.kubernetes.io/arch","operator":"NotIn","values":["arm64","arm32"]}]}]},"preferredDuringSchedulingIgnoredDuringExecution":[{"weight":5,"preference":{"matchExpressions":[{"key":"kubernetes.io/os","operator":"In","values":["linux"]}]}}]},"podAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"namespaces":["default"],"topologyKey":"kubernetes.io/hostname","labelSelector":{"matchExpressions":[{"key":"edas.oam.acname","operator":"NotIn","values":["edas-test-app"]}]}}]},"podAntiAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"podAffinityTerm":{"namespaces":["default"],"topologyKey":"failure-domain.beta.kubernetes.io/zone","labelSelector":{"matchExpressions":[{"key":"edas.oam.acname","operator":"In","values":["edas-test-app-2"]}]}},"weight":15}]}}'),
  customAgentVersion?: string(name='CustomAgentVersion'),
  customTolerations?: string(name='CustomTolerations', description='The scheduling tolerance configuration of the pod. This parameter takes effect only if both the DeployAcrossNodes and DeployAcrossZones parameters are set to false.', example='[{"key":"edas-taint-key2","operator":"Exists","effect":"NoExecute","tolerationSeconds":50},{"key":"edas-taint-key","operator":"Equal","value":"edas-taint-value","effect":"PreferNoSchedule"}]'),
  deployAcrossNodes?: string(name='DeployAcrossNodes', description='Specifies whether to distribute application instances to multiple nodes. Value true indicates that application instances are distrubuted across zones. Other values indicate that application instances are not distributed across zones.', example='true'),
  deployAcrossZones?: string(name='DeployAcrossZones', description='Specifies whether to distribute application instances across zones. Value true indicates that application instances are distrubuted across zones. Other values indicate that application instances are not distributed across zones.', example='true'),
  edasContainerVersion?: string(name='EdasContainerVersion', description='The version of EDAS Container on which the deployment package of the application depends. This parameter is applicable to High-Speed Service Framework (HSF) applications that you deploy by using WAR packages. This parameter is unavailable if you deploy applications by using images.', example='3.5.9'),
  emptyDirs?: string(name='EmptyDirs', description='The configuration for mounting a Kubernetes emptyDir volume to a directory in an elastic container instance. The following parameters are included in the configuration:

*   mountPath: The mount path in the container. This parameter is required.
*   readOnly: (Optional) The mount mode. Value true indicates the read-only mode. Value false indicates the read and write mode. Default value: false.
*   subPathExpr: (Optional) The regular expression that is used to match the subdirectory.', example='[{"mountPath":"/app-log","subPathExpr":"$(POD_IP)"},{"readOnly":true,"mountPath":"/etc/nginx"}]'),
  enableAhas?: boolean(name='EnableAhas', description='Specifies whether to enable access to Application High Availability Service (AHAS).', example='true'),
  enableEmptyPushReject?: boolean(name='EnableEmptyPushReject', description='Specifies whether to enable the empty list protection feature. Valid values:

*   true: enables the empty list protection feature.
*   false: disables the empty list protection feature.', example='false'),
  enableLosslessRule?: boolean(name='EnableLosslessRule', description='Specifies whether to enable graceful start rules. Valid values:

*   true: enables graceful start rules.
*   false: disables graceful start rules.', example='true'),
  envFroms?: string(name='EnvFroms', description='The Kubernetes environment variables that are configured in EnvFrom mode. A ConfigMap or Secret is mounted to a directory. Each key corresponds to a file in the directory, and the content of the file is the value of the key.

This parameter contains the following parameters:

*   configMapRef: the ConfigMap that is referenced. The following parameter is contained:

    *   name: the name of the ConfigMap.

*   secretRef: the Secret that is referenced. The following parameter is contained:

    *   name: the name of the Secret.', example='[{"name":"appname","valueFrom":{"configMapKeyRef":{"name":"appconf","key":"name"}}}]'),
  envs?: string(name='Envs', description='The environment variables that are used to deploy the application. Set this parameter to a JSON array. Valid values: regular environment variables, Kubernetes ConfigMap environment variables, and Kubernetes Secret environment variables. Specify regular environment variables in the following format:

`{"name":"x", "value": "y"}`

Specify Kubernetes ConfigMap environment variables in the following format to reference values from ConfigMaps:

`{ "name": "x2", "valueFrom": { "configMapKeyRef": { "name": "my-config", "key": "y2" } } }`

Specify Kubernetes Secret environment variables in the following format to reference values from Secrets:

`{ "name": "x3", "valueFrom": { "secretKeyRef": { "name": "my-secret", "key": "y3" } } }`

>  If you want to cancel this configuration, set this parameter to an empty JSON array, which is in the format of "[]".', example='[{"name":"x1","value":"y1"},{"name":"x2","valueFrom":{"configMapKeyRef":{"name":"my-config","key":"y2"}}},{"name":"x3","valueFrom":{"secretKeyRef":{"name":"my-secret","key":"y3"}}}]'),
  image?: string(name='Image', description='The absolute URL of the image. This parameter setting overwrites the setting of the ImageTag parameter.', example='registry-vpc.cn-beijing.aliyuncs.com/t****/app:v1'),
  imagePlatforms?: string(name='ImagePlatforms'),
  imageTag?: string(name='ImageTag', description='The tag of the image.', example='latest'),
  initContainers?: string(name='InitContainers'),
  JDK?: string(name='JDK', description='The version of the Java Development Kit (JDK) on which the deployment package of the application depends. Open JDK 7 and Open JDK 8 are supported. This parameter is unavailable if you deploy applications by using images.', example='Open JDK 8'),
  javaStartUpConfig?: string(name='JavaStartUpConfig', description='The configuration of Java startup parameters for a Java application. These startup parameters involve the memory, application, garbage collection (GC) policy, tools, service registration and discovery, and custom configurations. Proper parameter settings help reduce the GC overheads, shorten the server response time, and improve the throughput. Set this parameter to a JSON string. In the example, original indicates the configuration value, and startup indicates a startup parameter. The system automatically concatenates all startup values as the settings of Java startup parameters for the application. To delete this configuration, leave the parameter value empty by entering `""` or `"{}"`.', example='{"InitialHeapSize":{"original":512,"startup":"-Xms512m"},"MaxHeapSize":{"original":1024,"startup":"-Xmx1024m"}}'),
  labels?: string(name='Labels', description='The label of an application pod.', example='{"label-name-1":"label-value-1","label-name-2":"label-value-2"}'),
  limitEphemeralStorage?: int32(name='LimitEphemeralStorage', description='The maximum size of space required by ephemeral storage. Unit: GB. Value 0 indicates that no limit is set on the ephemeral storage space.', example='4'),
  liveness?: string(name='Liveness', description='The configuration for the liveness check on the container. Example: `{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}}`. If you want to cancel this configuration, set this parameter to `""` or `{}`. If you do not specify this parameter, this configuration is ignored.', example='{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}}'),
  localVolume?: string(name='LocalVolume', description='The configurations that are used when the host files are mounted to the container on which the application is running. Example: `[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}\\\\]`. The nodePath parameter specifies the host path, the mountPath parameter specifies the path within the container, and the type parameter specifies the mounting type.', example='[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}]'),
  losslessRuleAligned?: boolean(name='LosslessRuleAligned', description='Specifies whether to enable Graceful Rolling Release and configure Complete Service Registration before Readiness Probing. Valid values:

*   true: If you turn on the switch, the system uses the /health path and provides port 55199 for the health check. The system does not intrude into the application. When the service is registered, the system returns HTTP 200 status code. Otherwise, the system returns HTTP 500 status code.

> If you set both the LosslessRuleRelated parameter and this parameter to true, the operation checks whether the service prefetching is complete.

*   false: If you turn off the switch, the system does not provide a port to check whether the service is registered.', example='false'),
  losslessRuleDelayTime?: int32(name='LosslessRuleDelayTime', description='The delay of service registration. Valid values: 0 to 86400. Unit: seconds.', example='0'),
  losslessRuleFuncType?: int32(name='LosslessRuleFuncType', description='The number of prefetching curves. Valid values: 0 to 20. The default value is 2, which is suitable for common prefetching scenarios. This value indicates that the received traffic amount of the provider during prefetching is displayed as a quadratic curve.', example='2'),
  losslessRuleRelated?: boolean(name='LosslessRuleRelated', description='Specifies whether to enable Graceful Rolling Release and configure Complete Service Prefetching before Readiness Probing. Valid values:

*   true: If you turn on the switch, the system uses the /health path and provides port 55199 for the health check. The system does not intrude into the application. When service prefetching is complete, the system returns HTTP 200 status code. Otherwise, the system returns HTTP 500 status code.
*   false: If you turn off the switch, the system does not provide a port to check whether service prefetching is complete.', example='false'),
  losslessRuleWarmupTime?: int32(name='LosslessRuleWarmupTime', description='The service prefetching duration. Valid values: 0 to 86400. Unit: seconds.', example='120'),
  mcpuLimit?: int32(name='McpuLimit', description='The maximum number of CPU cores allowed. Unit: cores. Value 0 indicates that no limit is set on CPU cores.', example='0'),
  mcpuRequest?: int32(name='McpuRequest', description='The minimum number of CPU cores required. Unit: cores. Value 0 indicates that no limit is set on CPU cores.

> You must set this parameter together with the CpuLimit parameter. Make sure that the value of this parameter does not exceed that of the CpuLimit parameter.', example='4'),
  memoryLimit?: int32(name='MemoryLimit', description='The maximum size of memory allowed for each application instance when the application is running. Unit: MB. Value 0 indicates that no limit is set on the memory size.', example='0'),
  memoryRequest?: int32(name='MemoryRequest', description='The size of memory requested for each application instance when the application is running. Unit: MB. We recommend that you set this parameter. If you do not want to apply for a memory quota, set this parameter to 0.

> You must set this parameter together with the MemoryLimit parameter. Make sure that the value of this parameter does not exceed that of the MemoryLimit parameter.', example='0'),
  mountDescs?: string(name='MountDescs', description='The description of the NAS mounting configuration. Set this parameter to a serialized JSON string. Example: `[{"nasPath": "/k8s","mountPath": "/mnt"},{"nasPath": "/files","mountPath": "/app/files"}\\\\]`. The nasPath parameter specifies the file storage path, and the mountPath parameter specifies the path to mount the file system to the container in which the application is running.', example='[{"nasPath": "/k8s","mountPath": "/mnt"},{"nasPath": "/files","mountPath": "/app/files"}]'),
  nasId?: string(name='NasId', description='The ID of the Apsara File Storage NAS (NAS) file system mounted to the container in which the application is running. The NAS file system must be in the same region as the cluster. The NAS file system must have an available mount target, or have a mount target on the vSwitch in the virtual private cloud (VPC) in which the application resides. If you do not specify this parameter but specify the MountDescs parameter, a NAS file system is automatically purchased and mounted to the vSwitch in the VPC.', example='dfs23****'),
  packageUrl?: string(name='PackageUrl', description='The URL of the deployment package. This parameter is required if you use a FatJar or WAR package to deploy the application.

> The version of EDAS SDK for Java or Python must be V2.44.0 or later.', example='https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar'),
  packageVersion?: string(name='PackageVersion', description='The version of the deployment package. This parameter is required if you use a FatJar or WAR package to deploy the application. You must specify a version.

> The version of EDAS SDK for Java or Python must be V2.44.0 or later.', example='20200720'),
  packageVersionId?: string(name='PackageVersionId', description='The version ID of the deployment package.', example='2bcc********'),
  postStart?: string(name='PostStart', description='The post-start script. Example: `{"exec":{"command":["cat","/etc/group"\\\\]}}`. If you want to cancel this configuration, set this parameter to `""` or `{}`. If you do not specify this parameter, this configuration is ignored.', example='{\\\\"exec\\\\":{\\\\"command\\\\":[\\\\"ls\\\\",\\\\"/\\\\"]}}"'),
  preStop?: string(name='PreStop', description='The pre-stop script. Example: `{"tcpSocket":{"host":"", "port":8080}}`. If you want to cancel this configuration, set this parameter to `""` or `{}`. If you do not specify this parameter, this configuration is ignored.', example='{\\\\"exec\\\\":{\\\\"command\\\\":[\\\\"ls\\\\",\\\\"/\\\\"]}}"'),
  pvcMountDescs?: string(name='PvcMountDescs', description='The configuration for mounting a Kubernetes PersistentVolumeClaim (PVC) to a directory in an elastic container instance. The following parameters are included in the configuration:

*   pvcName: the name of the PVC. Make sure that the volume exists and is in the Bound state.

*   mountPaths: the directory to which you want to mount the PVC. You can configure multiple directories. You can set the following two parameters for each mount directory:

    *   mountPath: the mount path. The mount path must be an absolute path that starts with a forward slash (/).
    *   readOnly: the mount mode. Value true indicates the read-only mode. Value false indicates the read and write mode. Default value: false.', example='[{"pvcName":"nas-pvc-1","mountPaths":[{"mountPath":"/usr/share/nginx/data"},{"mountPath":"/usr/share/nginx/html","readOnly":true}]}]'),
  readiness?: string(name='Readiness', description='The configuration for the readiness check on the container. If the check fails, the traffic that passes through the Kubernetes service is not transmitted to the container. Example: `{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": [{"name": "test","value": "testvalue"}\\\\]}}`. If you want to cancel this configuration, set this parameter to `""` or `{}`. If you do not specify this parameter, this configuration is ignored.', example='{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": [{"name": "test","value": "testvalue"}]}}'),
  replicas?: int32(name='Replicas', description='The number of application instances. The minimum value is 0.', example='1'),
  requestsEphemeralStorage?: int32(name='RequestsEphemeralStorage', description='The minimum size of space required by ephemeral storage. Unit: GB. Value 0 indicates that no limit is set on the ephemeral storage space.', example='2'),
  runtimeClassName?: string(name='RuntimeClassName', description='The type of the container runtime. Valid values:

*   runc: standard container runtime
*   runv: sandboxed container runtime

This parameter is applicable only to clusters that use sandboxed containers.', example='runc'),
  sidecars?: string(name='Sidecars'),
  slsConfigs?: string(name='SlsConfigs', description='The Logstore configuration. If you want to cancel this configuration, leave the parameter value empty by entering `""` or `"{}"`.

*   The following parameters are included in the configuration:

    *   type: the collection type. Set this parameter to file to specify the file type. Set this parameter to stdout to specify the standard output type.

    *   logstore: the name of the Logstore. Make sure that the name of the Logstore is unique in the cluster. The name must comply with the following rules:

        *   The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
        *   The name must start and end with a lowercase letter or a digit.
        *   The name must be 3 to 63 characters in length. If you leave this parameter empty, the system automatically generates a name.

    *   logDir: If the standard output type is used, the collection path is stdout.log. If the file type is used, the collection path is the path of the collected file. Wildcards (\\\\*) are supported. The collection path must match the following regular expression: `^/(.+)/(.*)^/$`.', example='[{"logstore":"thisisanotherfilelog","type":"file","logDir":"/var/log/*"},{"logstore":"","type":"stdout","logDir":"stdout.log"},{"logstore":"thisisafilelog","type":"file","logDir":"/tmp/log/*"}]'),
  startup?: string(name='Startup'),
  storageType?: string(name='StorageType', description='The storage type of the NAS file system.

*   Valid values for General-purpose NAS file systems: Capacity and Performance.
*   Valid values for Extreme NAS file systems: standard and advance.

You can set this parameter only to Performance.', example='Performance'),
  terminateGracePeriod?: int32(name='TerminateGracePeriod'),
  trafficControlStrategy?: string(name='TrafficControlStrategy', description='The traffic adjustment policy for a canary release.', example='{"http":{"rules":[{"conditionType":"percent","percent":10}]}}'),
  updateStrategy?: string(name='UpdateStrategy', description='The phased release policy.

*   Example 1: One instance for a canary release + Two subsequent batches + Automatic batching + 1-minute batch interval.

`{"type":"GrayBatchUpdate","batchUpdate":{"batch":2,"releaseType":"auto","batchWaitTime":1},"grayUpdate":{"gray":1}}`

*   Example 2: One instance for a canary release + Two subsequent batches + Manual batching.

`{"type":"GrayBatchUpdate","batchUpdate":{"batch":2,"releaseType":"manual"},"grayUpdate":{"gray":1}}`

*   Example 3: Two batches + Automatic batching + 0-minute batch interval.

`{"type":"BatchUpdate","batchUpdate":{"batch":2,"releaseType":"auto","batchWaitTime":0}}`', example='{"type":"GrayBatchUpdate","batchUpdate":{"batch":2,"releaseType":"auto","batchWaitTime":1},"grayUpdate":{"gray":1}}'),
  uriEncoding?: string(name='UriEncoding', description='The URI encoding scheme. Valid values: ISO-8859-1, GBK, GB2312, and UTF-8.

> If you do not specify this parameter in the application configurations, the default URI encoding scheme in the Tomcat container is applied.', example='GBK'),
  useBodyEncoding?: boolean(name='UseBodyEncoding', description='Specifies whether to use the encoding scheme specified in the request body for URI query parameters.

> If this parameter is not specified in application configuration, the default value false is applied.', example='false'),
  userBaseImageUrl?: string(name='UserBaseImageUrl'),
  volumesStr?: string(name='VolumesStr', description='The data volume.', example='test'),
  webContainer?: string(name='WebContainer', description='The version of the Tomcat container on which the deployment package of the application depends. This parameter is applicable to Spring Cloud and Dubbo applications that you deploy by using WAR packages. This parameter is unavailable if you deploy applications by using images.', example='apache-tomcat-7.0.91'),
  webContainerConfig?: string(name='WebContainerConfig', description='The Tomcat container configuration. If you want to cancel this configuration, set this parameter to `""` or `"{}"`. The following parameters are included in the configuration:

*   useDefaultConfig: specifies whether to use the default configuration. Value true indicates to use the default configuration. Value false indicates to use the custom configuration. If the default configuration is used, the following parameters do not take effect.

*   contextInputType: the type of the access path for the application. Valid values:

    *   war: The access path for the application is the name of the WAR package. You do not need to specify a custom path.
    *   root: The access path for the application is /. You do not need to specify a custom path.
    *   custom: If you select this option, you must specify a custom path for the contextPath parameter.

*   contextPath: the custom access path for the application. This parameter is required only when you set the contextInputType parameter to custom.

*   httpPort: the port number. The port number ranges from 1024 to 65535. Though the admin permissions are configured for the container, the root permissions are required to perform operations on ports whose number is less than 1024. Enter a value that ranges from 1025 to 65535 because the container has only the admin permissions. If you do not configure this parameter, the default port number 8080 is used.

*   maxThreads: the maximum number of connections in the connection pool. Default value: 400.

    **

    **Note**This parameter greatly affects the application performance. We recommend that you set this parameter under professional guidance.

*   uriEncoding: the URI encoding scheme in the Tomcat container. Valid values: UTF-8, ISO-8859-1, GBK, and GB2312. If you do not specify this parameter, the default value ISO-8859-1 is used.

*   useBodyEncoding: specifies whether to use the encoding scheme specified in the request body for URI query parameters.

*   useAdvancedServerXml: specifies whether to use advanced configurations to customize the `server.xml` file. If the preceding parameter types and specific parameters cannot meet your requirements, you can use advanced configurations to customize the `server.xml` file of Tomcat.

*   serverXml: the content of the `server.xml` file customized by using advanced configurations. This parameter takes effect only when you set the useAdvancedServerXml parameter to true.', example='{"useDefaultConfig":false,"contextInputType":"custom","contextPath":"hello","httpPort":8088,"maxThreads":400,"uriEncoding":"UTF-8","useBodyEncoding":true,"useAdvancedServerXml":false}'),
}

model DeployK8sApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process. You can call the GetChangeOrderInfo operation to query the change process ID. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).', example='cd65b247-****-475b-ad4b-7039040d625c'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de*****'),
}

model DeployK8sApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeployK8sApplicationResponseBody(name='body'),
}

/**
 * @summary Deploys an application in a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster.
 *
 * @param request DeployK8sApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeployK8sApplicationResponse
 */
async function deployK8sApplicationWithOptions(request: DeployK8sApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeployK8sApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.annotations)) {
    query['Annotations'] = request.annotations;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.args)) {
    query['Args'] = request.args;
  }
  if (!Util.isUnset(request.batchTimeout)) {
    query['BatchTimeout'] = request.batchTimeout;
  }
  if (!Util.isUnset(request.batchWaitTime)) {
    query['BatchWaitTime'] = request.batchWaitTime;
  }
  if (!Util.isUnset(request.buildPackId)) {
    query['BuildPackId'] = request.buildPackId;
  }
  if (!Util.isUnset(request.canaryRuleId)) {
    query['CanaryRuleId'] = request.canaryRuleId;
  }
  if (!Util.isUnset(request.changeOrderDesc)) {
    query['ChangeOrderDesc'] = request.changeOrderDesc;
  }
  if (!Util.isUnset(request.command)) {
    query['Command'] = request.command;
  }
  if (!Util.isUnset(request.configMountDescs)) {
    query['ConfigMountDescs'] = request.configMountDescs;
  }
  if (!Util.isUnset(request.cpuLimit)) {
    query['CpuLimit'] = request.cpuLimit;
  }
  if (!Util.isUnset(request.cpuRequest)) {
    query['CpuRequest'] = request.cpuRequest;
  }
  if (!Util.isUnset(request.customAffinity)) {
    query['CustomAffinity'] = request.customAffinity;
  }
  if (!Util.isUnset(request.customAgentVersion)) {
    query['CustomAgentVersion'] = request.customAgentVersion;
  }
  if (!Util.isUnset(request.customTolerations)) {
    query['CustomTolerations'] = request.customTolerations;
  }
  if (!Util.isUnset(request.deployAcrossNodes)) {
    query['DeployAcrossNodes'] = request.deployAcrossNodes;
  }
  if (!Util.isUnset(request.deployAcrossZones)) {
    query['DeployAcrossZones'] = request.deployAcrossZones;
  }
  if (!Util.isUnset(request.edasContainerVersion)) {
    query['EdasContainerVersion'] = request.edasContainerVersion;
  }
  if (!Util.isUnset(request.emptyDirs)) {
    query['EmptyDirs'] = request.emptyDirs;
  }
  if (!Util.isUnset(request.enableAhas)) {
    query['EnableAhas'] = request.enableAhas;
  }
  if (!Util.isUnset(request.enableEmptyPushReject)) {
    query['EnableEmptyPushReject'] = request.enableEmptyPushReject;
  }
  if (!Util.isUnset(request.enableLosslessRule)) {
    query['EnableLosslessRule'] = request.enableLosslessRule;
  }
  if (!Util.isUnset(request.envFroms)) {
    query['EnvFroms'] = request.envFroms;
  }
  if (!Util.isUnset(request.envs)) {
    query['Envs'] = request.envs;
  }
  if (!Util.isUnset(request.image)) {
    query['Image'] = request.image;
  }
  if (!Util.isUnset(request.imagePlatforms)) {
    query['ImagePlatforms'] = request.imagePlatforms;
  }
  if (!Util.isUnset(request.imageTag)) {
    query['ImageTag'] = request.imageTag;
  }
  if (!Util.isUnset(request.initContainers)) {
    query['InitContainers'] = request.initContainers;
  }
  if (!Util.isUnset(request.JDK)) {
    query['JDK'] = request.JDK;
  }
  if (!Util.isUnset(request.javaStartUpConfig)) {
    query['JavaStartUpConfig'] = request.javaStartUpConfig;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.limitEphemeralStorage)) {
    query['LimitEphemeralStorage'] = request.limitEphemeralStorage;
  }
  if (!Util.isUnset(request.liveness)) {
    query['Liveness'] = request.liveness;
  }
  if (!Util.isUnset(request.localVolume)) {
    query['LocalVolume'] = request.localVolume;
  }
  if (!Util.isUnset(request.losslessRuleAligned)) {
    query['LosslessRuleAligned'] = request.losslessRuleAligned;
  }
  if (!Util.isUnset(request.losslessRuleDelayTime)) {
    query['LosslessRuleDelayTime'] = request.losslessRuleDelayTime;
  }
  if (!Util.isUnset(request.losslessRuleFuncType)) {
    query['LosslessRuleFuncType'] = request.losslessRuleFuncType;
  }
  if (!Util.isUnset(request.losslessRuleRelated)) {
    query['LosslessRuleRelated'] = request.losslessRuleRelated;
  }
  if (!Util.isUnset(request.losslessRuleWarmupTime)) {
    query['LosslessRuleWarmupTime'] = request.losslessRuleWarmupTime;
  }
  if (!Util.isUnset(request.mcpuLimit)) {
    query['McpuLimit'] = request.mcpuLimit;
  }
  if (!Util.isUnset(request.mcpuRequest)) {
    query['McpuRequest'] = request.mcpuRequest;
  }
  if (!Util.isUnset(request.memoryLimit)) {
    query['MemoryLimit'] = request.memoryLimit;
  }
  if (!Util.isUnset(request.memoryRequest)) {
    query['MemoryRequest'] = request.memoryRequest;
  }
  if (!Util.isUnset(request.mountDescs)) {
    query['MountDescs'] = request.mountDescs;
  }
  if (!Util.isUnset(request.nasId)) {
    query['NasId'] = request.nasId;
  }
  if (!Util.isUnset(request.packageUrl)) {
    query['PackageUrl'] = request.packageUrl;
  }
  if (!Util.isUnset(request.packageVersion)) {
    query['PackageVersion'] = request.packageVersion;
  }
  if (!Util.isUnset(request.packageVersionId)) {
    query['PackageVersionId'] = request.packageVersionId;
  }
  if (!Util.isUnset(request.postStart)) {
    query['PostStart'] = request.postStart;
  }
  if (!Util.isUnset(request.preStop)) {
    query['PreStop'] = request.preStop;
  }
  if (!Util.isUnset(request.pvcMountDescs)) {
    query['PvcMountDescs'] = request.pvcMountDescs;
  }
  if (!Util.isUnset(request.readiness)) {
    query['Readiness'] = request.readiness;
  }
  if (!Util.isUnset(request.replicas)) {
    query['Replicas'] = request.replicas;
  }
  if (!Util.isUnset(request.requestsEphemeralStorage)) {
    query['RequestsEphemeralStorage'] = request.requestsEphemeralStorage;
  }
  if (!Util.isUnset(request.runtimeClassName)) {
    query['RuntimeClassName'] = request.runtimeClassName;
  }
  if (!Util.isUnset(request.sidecars)) {
    query['Sidecars'] = request.sidecars;
  }
  if (!Util.isUnset(request.slsConfigs)) {
    query['SlsConfigs'] = request.slsConfigs;
  }
  if (!Util.isUnset(request.startup)) {
    query['Startup'] = request.startup;
  }
  if (!Util.isUnset(request.storageType)) {
    query['StorageType'] = request.storageType;
  }
  if (!Util.isUnset(request.terminateGracePeriod)) {
    query['TerminateGracePeriod'] = request.terminateGracePeriod;
  }
  if (!Util.isUnset(request.trafficControlStrategy)) {
    query['TrafficControlStrategy'] = request.trafficControlStrategy;
  }
  if (!Util.isUnset(request.updateStrategy)) {
    query['UpdateStrategy'] = request.updateStrategy;
  }
  if (!Util.isUnset(request.uriEncoding)) {
    query['UriEncoding'] = request.uriEncoding;
  }
  if (!Util.isUnset(request.useBodyEncoding)) {
    query['UseBodyEncoding'] = request.useBodyEncoding;
  }
  if (!Util.isUnset(request.userBaseImageUrl)) {
    query['UserBaseImageUrl'] = request.userBaseImageUrl;
  }
  if (!Util.isUnset(request.volumesStr)) {
    query['VolumesStr'] = request.volumesStr;
  }
  if (!Util.isUnset(request.webContainer)) {
    query['WebContainer'] = request.webContainer;
  }
  if (!Util.isUnset(request.webContainerConfig)) {
    query['WebContainerConfig'] = request.webContainerConfig;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeployK8sApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_apps`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deploys an application in a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster.
 *
 * @param request DeployK8sApplicationRequest
 * @return DeployK8sApplicationResponse
 */
async function deployK8sApplication(request: DeployK8sApplicationRequest): DeployK8sApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deployK8sApplicationWithOptions(request, headers, runtime);
}

model DescribeAppInstanceListRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the ID of the application. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='93fdd228-*****-ed2ae98de18d'),
  withNodeInfo?: boolean(name='WithNodeInfo', description='Specifies whether to return the information about the node in which the pod resides.

*   `true`: returns the information about the node in which the pod resides
*   `false`: does not return the information about the node in which the pod resides', example='true'),
}

model DescribeAppInstanceListResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  instanceList?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='93fdd228-*****-ed2ae98de18d'),
      canary?: boolean(name='Canary', description='Indicates whether the application was released in canary release mode.

*   `true`: The application was released in canary release mode.
*   `false`: The application was not released in canary release mode', example='false'),
      groupId?: string(name='GroupId', description='The ID of the instance group to which the application is deployed.', example='93fdd228-*****-ed2ae98de18d'),
      groupName?: string(name='GroupName', description='The name of the instance group to which the application is deployed.', example='_DEFAULT_GROUP'),
      nodeLabels?: string(name='NodeLabels', description='The labels of the node. The value is a JSON string.', example='{"alibabacloud.com/nodepool-id":"np0*5b9377fa907","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"ecs.*","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"cn-hangzhou","failure-domain.beta.kubernetes.io/zone":"cn-hangzhou-b","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"cn-hangzhou*","kubernetes.io/os":"linux","node.kubernetes.io/instance-type":"ecs.*","topology.diskplugin.csi.alibabacloud.com/zone":"cn-hangzhou-b","topology.kubernetes.io/region":"cn-hangzhou","topology.kubernetes.io/zone":"cn-hangzhou-b"}'),
      nodeName?: string(name='NodeName', description='The name of the node.', example='cn-hangzhou.192.168.0.*'),
      podRaw?: string(name='PodRaw', description='The information about the pod. The value is a JSON string.', example='{"metadata":{"name":"oambuild-group-1-*4xthz","generateName":"oambuild-group-*96-","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/oambuild-grou*96-4xthz","uid":"7a23399c-*fe7ff4018","resourceVersion":"969614830","creationTimestamp":"2021-04-06T11:38:46Z","labels":{"ARMSApmAppId":"*","ARMSApmLicenseKey":"*"...'),
      version?: string(name='Version', description='The deployment package version of the node.', example='2021-04-06 19:37:42'),
    }
  ](name='InstanceList', description='The application instances.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='03FD1520-0FD6-436A-****-265318D7****'),
}

model DescribeAppInstanceListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppInstanceListResponseBody(name='body'),
}

/**
 * @summary Queries Kubernetes application instances.
 *
 * @param request DescribeAppInstanceListRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppInstanceListResponse
 */
async function describeAppInstanceListWithOptions(request: DescribeAppInstanceListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeAppInstanceListResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.withNodeInfo)) {
    query['WithNodeInfo'] = request.withNodeInfo;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppInstanceList',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/oam/app_instance_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Kubernetes application instances.
 *
 * @param request DescribeAppInstanceListRequest
 * @return DescribeAppInstanceListResponse
 */
async function describeAppInstanceList(request: DescribeAppInstanceListRequest): DescribeAppInstanceListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeAppInstanceListWithOptions(request, headers, runtime);
}

model DescribeApplicationScalingRulesRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='78194c76-3dca-418e-a263-cccd1ab4****'),
}

model DescribeApplicationScalingRulesResponseBody = {
  appScalingRules?: {
    currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of auto scaling policies returned per page.', example='10'),
    result?: [ 
      {
        appId?: string(name='AppId', description='The ID of the application to which the auto scaling policy belongs.', example='78194c76-3dca-418e-a263-cccd1ab4****'),
        behaviour?: {
          scaleDown?: {
            policies?: [ 
              {
                periodSeconds?: int32(name='PeriodSeconds'),
                type?: string(name='Type'),
                value?: string(name='Value'),
              }
            ](name='Policies'),
            selectPolicy?: string(name='SelectPolicy'),
            stabilizationWindowSeconds?: int32(name='StabilizationWindowSeconds'),
          }(name='ScaleDown'),
          scaleUp?: {
            policies?: [ 
              {
                periodSeconds?: int32(name='PeriodSeconds'),
                type?: string(name='Type'),
                value?: string(name='Value'),
              }
            ](name='Policies'),
            selectPolicy?: string(name='SelectPolicy'),
            stabilizationWindowSeconds?: int32(name='StabilizationWindowSeconds'),
          }(name='ScaleUp'),
        }(name='Behaviour'),
        createTime?: long(name='CreateTime', description='The time when the auto scaling policy was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='23212323123'),
        lastDisableTime?: long(name='LastDisableTime', description='The time when the auto scaling policy was last disabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='23212323123'),
        maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
        metric?: {
          maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
          metrics?: [ 
            {
              metricTargetAverageUtilization?: int32(name='MetricTargetAverageUtilization', description='This parameter is deprecated.', example='1'),
              metricType?: string(name='MetricType', description='This parameter is deprecated.', example='asd'),
            }
          ](name='Metrics', description='This parameter is deprecated.'),
          minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
        }(name='Metric', description='This parameter is deprecated.'),
        minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
        scaleRuleEnabled?: boolean(name='ScaleRuleEnabled', description='Indicates whether the auto scaling policy is enabled. Valid values:

*   **true**: The auto scaling policy is enabled.
*   **false**: The auto scaling policy is disabled.', example='true'),
        scaleRuleName?: string(name='ScaleRuleName', description='The name of the auto scaling policy.', example='cpu-trigger'),
        scaleRuleType?: string(name='ScaleRuleType', description='The type of the auto scaling policy. The value is fixed to trigger.', example='trigger'),
        trigger?: {
          maxReplicas?: int32(name='MaxReplicas', description='The maximum number of replicas. The upper limit is 1000.', example='122'),
          minReplicas?: int32(name='MinReplicas', description='The minimum number of replicas. The lower limit is 0.', example='1'),
          triggers?: [ 
            {
              metaData?: string(name='MetaData', description='The metadata of the trigger.', example='{"dryRun":true}'),
              name?: string(name='Name', description='The name of the trigger.', example='cron-trigger'),
              type?: string(name='Type', description='The type of the trigger. Valid values: cron and app_metric.', example='cron'),
            }
          ](name='Triggers', description='The configurations of the trigger.'),
        }(name='Trigger', description='The configurations of the trigger.'),
        updateTime?: long(name='UpdateTime', description='The time when the auto scaling policy was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='23212323123'),
      }
    ](name='Result', description='The information about auto scaling policies.'),
    totalSize?: long(name='TotalSize', description='The total number of auto scaling policies.', example='20'),
  }(name='AppScalingRules', description='The auto scaling policies of the application.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
}

model DescribeApplicationScalingRulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApplicationScalingRulesResponseBody(name='body'),
}

/**
 * @summary Queries the auto scaling policies of an application.
 *
 * @param request DescribeApplicationScalingRulesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApplicationScalingRulesResponse
 */
async function describeApplicationScalingRulesWithOptions(request: DescribeApplicationScalingRulesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeApplicationScalingRulesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApplicationScalingRules',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v1/eam/scale/application_scaling_rules`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the auto scaling policies of an application.
 *
 * @param request DescribeApplicationScalingRulesRequest
 * @return DescribeApplicationScalingRulesResponse
 */
async function describeApplicationScalingRules(request: DescribeApplicationScalingRulesRequest): DescribeApplicationScalingRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeApplicationScalingRulesWithOptions(request, headers, runtime);
}

model DisableApplicationScalingRuleRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='78194c76-3dca-418e-a263-cccd1ab4****'),
  scalingRuleName?: string(name='ScalingRuleName', description='The name of the auto scaling policy.', example='cron-trigger'),
}

model DisableApplicationScalingRuleResponseBody = {
  appScalingRule?: {
    appId?: string(name='AppId', description='The ID of the application to which the auto scaling policy belongs.', example='78194c76-3dca-418e-a263-cccd1ab4****'),
    createTime?: long(name='CreateTime', description='The time when the auto scaling policy was created.', example='23212323123'),
    lastDisableTime?: long(name='LastDisableTime', description='The time when the auto scaling policy was last disabled.', example='23212323123'),
    maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
    metric?: {
      maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='12'),
      metrics?: [ 
        {
          metricTargetAverageUtilization?: int32(name='MetricTargetAverageUtilization', description='This parameter is deprecated.', example='1'),
          metricType?: string(name='MetricType', description='This parameter is deprecated.', example='1'),
        }
      ](name='Metrics', description='This parameter is deprecated.'),
      minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
    }(name='Metric', description='This parameter is deprecated.'),
    minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
    scaleRuleEnabled?: boolean(name='ScaleRuleEnabled', description='Indicates whether the auto scaling policy is enabled. Valid values:

*   **true**: The auto scaling policy is enabled.
*   **false**: The auto scaling policy is disabled.', example='true'),
    scaleRuleName?: string(name='ScaleRuleName', description='The name of the auto scaling policy.', example='cron-trigger'),
    scaleRuleType?: string(name='ScaleRuleType', description='The type of the auto scaling policy. The value is fixed to trigger.', example='trigger'),
    trigger?: {
      maxReplicas?: int32(name='MaxReplicas', description='The maximum number of replicas. The upper limit is 1000.', example='12'),
      minReplicas?: int32(name='MinReplicas', description='The minimum number of replicas. The lower limit is 0.', example='1'),
      triggers?: [ 
        {
          metaData?: string(name='MetaData', description='The metadata of the trigger.', example='{"dryRun":true}'),
          name?: string(name='Name', description='The name of the trigger.', example='cron-trigger'),
          type?: string(name='Type', description='The type of the trigger. Valid values: cron and app_metric.', example='cron'),
        }
      ](name='Triggers', description='The information about the trigger.'),
    }(name='Trigger', description='The configurations of the trigger.'),
    updateTime?: long(name='UpdateTime', description='The time when the auto scaling policy was last modified.', example='23212323123'),
  }(name='AppScalingRule', description='The information about the auto scaling policy.'),
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='5d6fa0bc-cc3**********'),
}

model DisableApplicationScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DisableApplicationScalingRuleResponseBody(name='body'),
}

/**
 * @summary Disables an auto scaling policy for an application.
 *
 * @param request DisableApplicationScalingRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DisableApplicationScalingRuleResponse
 */
async function disableApplicationScalingRuleWithOptions(request: DisableApplicationScalingRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DisableApplicationScalingRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DisableApplicationScalingRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v1/eam/scale/disable_application_scaling_rule`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Disables an auto scaling policy for an application.
 *
 * @param request DisableApplicationScalingRuleRequest
 * @return DisableApplicationScalingRuleResponse
 */
async function disableApplicationScalingRule(request: DisableApplicationScalingRuleRequest): DisableApplicationScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return disableApplicationScalingRuleWithOptions(request, headers, runtime);
}

model EnableApplicationScalingRuleRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='78194c76-3dca-418e-a263-cccd1ab4****'),
  scalingRuleName?: string(name='ScalingRuleName', description='The name of the auto scaling policy.', example='cpu-trigger'),
}

model EnableApplicationScalingRuleResponseBody = {
  appScalingRule?: {
    appId?: string(name='AppId', description='The ID of the application to which the auto scaling policy belongs.', example='78194c76-3dca-418e-a263-cccd1ab4****'),
    createTime?: long(name='CreateTime', description='The time when the auto scaling policy was created.', example='23212323123'),
    lastDisableTime?: long(name='LastDisableTime', description='The time when the auto scaling policy was last disabled.', example='23212323123'),
    maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
    metric?: {
      maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
      metrics?: [ 
        {
          metricTargetAverageUtilization?: int32(name='MetricTargetAverageUtilization', description='This parameter is deprecated.', example='12'),
          metricType?: string(name='MetricType', description='This parameter is deprecated.', example='cpu'),
        }
      ](name='Metrics', description='This parameter is deprecated.'),
      minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
    }(name='Metric', description='This parameter is deprecated.'),
    minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
    scaleRuleEnabled?: boolean(name='ScaleRuleEnabled', description='Indicates whether the auto scaling policy is enabled. Valid values:

*   **true**: The auto scaling policy is enabled.
*   **false**: The auto scaling policy is disabled.', example='true'),
    scaleRuleName?: string(name='ScaleRuleName', description='The name of the auto scaling policy.', example='cpu-trigger'),
    scaleRuleType?: string(name='ScaleRuleType', description='The type of the auto scaling policy. The value is fixed to trigger.', example='trigger'),
    trigger?: {
      maxReplicas?: int32(name='MaxReplicas', description='The maximum number of replicas. The upper limit is 1000.', example='122'),
      minReplicas?: int32(name='MinReplicas', description='The minimum number of replicas. The lower limit is 0.', example='1'),
      triggers?: [ 
        {
          metaData?: string(name='MetaData', description='The metadata of the trigger.', example='{"dryRun":true}'),
          name?: string(name='Name', description='The name of the trigger.', example='cpu'),
          type?: string(name='Type', description='The type of the trigger. Valid values: cron and app_metric.', example='cron'),
        }
      ](name='Triggers', description='The list of triggers.'),
    }(name='Trigger', description='The configurations of the trigger.'),
    updateTime?: long(name='UpdateTime', description='The time when the auto scaling policy was last modified.', example='23212323123'),
  }(name='AppScalingRule', description='The information about the auto scaling policy.'),
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
}

model EnableApplicationScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableApplicationScalingRuleResponseBody(name='body'),
}

/**
 * @summary Enables an auto scaling policy for an application.
 *
 * @param request EnableApplicationScalingRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableApplicationScalingRuleResponse
 */
async function enableApplicationScalingRuleWithOptions(request: EnableApplicationScalingRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): EnableApplicationScalingRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableApplicationScalingRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v1/eam/scale/enable_application_scaling_rule`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Enables an auto scaling policy for an application.
 *
 * @param request EnableApplicationScalingRuleRequest
 * @return EnableApplicationScalingRuleResponse
 */
async function enableApplicationScalingRule(request: EnableApplicationScalingRuleRequest): EnableApplicationScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return enableApplicationScalingRuleWithOptions(request, headers, runtime);
}

model GetAppDeploymentRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID.

This parameter is required.', example='93fdd228-*****-ed2ae98de18d'),
}

model GetAppDeploymentResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='The information about the Deployment of the application. The value is a JSON string.', example='{"metadata":{"name":"oambuild-group*","namespace":"default","selfLink":"/apis/apps/v1/namespaces/default/deployments/oambuil*","uid":"*-afc0-436e-9949-fb01994a9b63","resourceVersion":"969614832","generation":2,"creationTimestamp":"2021-04-06T11:38:46Z","labels":{"edas-domain":"edas-admin","edas.aliyun.oam.com/rollout-name":"oambuild-group-1","edas.aliyun.oam.com/rollout-namespace":"default","edas.aliyun.oam.com/rollout-revision":"3","edas.appid":"fc5e0f54-*-4cab-91a0-b7becb1f6174","edas.controlplane":"edas-oam","edas.oam.acname":"oambuild"...'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='03FD1520-0FD6-436A-****-265318D7****'),
}

model GetAppDeploymentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAppDeploymentResponseBody(name='body'),
}

/**
 * @summary Queries the information about the Deployment of a Kubernetes application.
 *
 * @param request GetAppDeploymentRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAppDeploymentResponse
 */
async function getAppDeploymentWithOptions(request: GetAppDeploymentRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetAppDeploymentResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAppDeployment',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/oam/app_deployment`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the information about the Deployment of a Kubernetes application.
 *
 * @param request GetAppDeploymentRequest
 * @return GetAppDeploymentResponse
 */
async function getAppDeployment(request: GetAppDeploymentRequest): GetAppDeploymentResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getAppDeploymentWithOptions(request, headers, runtime);
}

model GetApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='29f0******************'),
}

model GetApplicationResponseBody = {
  application?: {
    appId?: string(name='AppId', description='The ID of the application.', example='cfac****-847e-4325-ad56-b5c2bc54****'),
    appPhase?: string(name='AppPhase', description='The current status of the Kubernetes application, which is used to determine whether the application is in a stable state. If the application is in an unstable state, related configuration operations are prohibited. Valid values:

*   ready: The application is in the ready state and can be changed.
*   progressive: The application is being changed.
*   pending: The application change is blocked.
*   failed: The application fails to be changed.

In these states, ready is a stable state and other states are unstable.', example='ready'),
    applicationType?: string(name='ApplicationType', description='The deployment type of the application. Valid values:

*   War: The application is deployed by using a WAR package.
*   FatJar: The application is deployed by using a JAR package.
*   Empty: The application is not deployed.', example='FatJar'),
    buildPackageId?: long(name='BuildPackageId', description='The build package number of Enterprise Distributed Application Service (EDAS) Container.', example='59'),
    clusterId?: string(name='ClusterId', description='The ID of the ECS cluster in which the application is deployed.', example='5ffc5895-****-b03a-c223c6c3****'),
    clusterType?: string(name='ClusterType', description='The type of the cluster. Valid values:

*   0: regular Docker cluster
*   1: Swarm cluster
*   2: ECS cluster
*   3: Kubernetes cluster
*   4: cluster in which Pandora automatically registers applications', example='2'),
    cpu?: int32(name='Cpu', description='The number of CPU cores.', example='1'),
    createTime?: long(name='CreateTime', description='The time when the application was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1610550324226'),
    description?: string(name='Description', description='The description of the application.', example='test'),
    dockerize?: boolean(name='Dockerize', description='Indicates whether the application is a Docker application. Valid values:

*   false: The application is not a Docker application.
*   true: The application is a Docker application.', example='false'),
    email?: string(name='Email', description='The email address of the account.', example='xxxx@gmail.com'),
    enablePortCheck?: boolean(name='EnablePortCheck', description='Indicates whether the port health check is enabled. Valid values:

*   true: The port health check is enabled.
*   false: The port health check is disabled.

If the port health check is enabled, EDAS checks whether a port exists during application startup. If the port exists, the application is considered to have started.', example='false'),
    enableUrlCheck?: boolean(name='EnableUrlCheck', description='Indicates whether the URL health check is enabled. Valid values:

*   true: The URL health check is enabled.
*   false: The URL health check is disabled.

If the URL health check is enabled, EDAS attempts to detect the specified URL during application startup. If EDAS detects the specified URL, the application is considered to have started.', example='false'),
    extSlbId?: string(name='ExtSlbId', description='The ID of the Internet-facing SLB instance that is bound to the application.', example='lb-bp1vceck3s3b9xs6x****'),
    extSlbIp?: string(name='ExtSlbIp', description='The IP address of the Internet-facing Server Load Balancer (SLB) instance that is bound to the application.', example='47.114.xxx.xx'),
    extSlbName?: string(name='ExtSlbName', description='The name of the Internet-facing SLB instance that is bound to the application.', example='aa8eee383db084f42aebc4d9f52c****'),
    haveManageAccess?: string(name='HaveManageAccess'),
    healthCheckUrl?: string(name='HealthCheckUrl', description='The health check URL of the application.', example='http://127.0.0.1:8080/xyz.html'),
    instanceCount?: int32(name='InstanceCount', description='The number of instances deployed with the application.', example='1'),
    memory?: int32(name='Memory', description='The memory size of the application instance. Unit: MB.', example='0'),
    name?: string(name='Name', description='The name of the application.', example='test'),
    nameSpace?: string(name='NameSpace', description='The namespace to which the application belongs.', example='doc-test'),
    owner?: string(name='Owner', description='The ID of the user who created the application.', example='ouou@117274586608****'),
    port?: int32(name='Port', description='The service port of the application.', example='8080'),
    regionId?: string(name='RegionId', description='The ID of the region in which the application is deployed.', example='cn-hangzhou'),
    resourceGroupId?: string(name='ResourceGroupId'),
    runningInstanceCount?: int32(name='RunningInstanceCount', description='The number of running instances for the application.', example='1'),
    slbId?: string(name='SlbId', description='The ID of the internal-facing SLB instance that is bound to the application.', example='lb-bp****ck3s3b9xs6x****'),
    slbInfo?: string(name='SlbInfo', description='The information about the internal-facing SLB instance that is bound to the application.', example='test'),
    slbIp?: string(name='SlbIp', description='The IP address of the internal-facing SLB instance that is bound to the application.', example='192.168.0.100'),
    slbName?: string(name='SlbName', description='The name of the internal-facing SLB instance that is bound to the application.', example='test'),
    slbPort?: int32(name='SlbPort', description='The port of the internal-facing SLB instance that is bound to the application.', example='80'),
    userId?: string(name='UserId', description='The ID of the Alibaba Cloud account.', example='test@dd******'),
    workloadType?: string(name='WorkloadType'),
  }(name='Application', description='The details of the application.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='F8DFGED-K98***************'),
}

model GetApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetApplicationResponseBody(name='body'),
}

/**
 * @summary Queries the details about a specified application in an Elastic Compute Service (ECS) cluster.
 *
 * @param request GetApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetApplicationResponse
 */
async function getApplicationWithOptions(request: GetApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/app_info`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the details about a specified application in an Elastic Compute Service (ECS) cluster.
 *
 * @param request GetApplicationRequest
 * @return GetApplicationResponse
 */
async function getApplication(request: GetApplicationRequest): GetApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getApplicationWithOptions(request, headers, runtime);
}

model GetChangeOrderInfoRequest {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.

This parameter is required.', example='1074f3e2-e974-4a0e-****-************'),
}

model GetChangeOrderInfoResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4JFR-FV9F***************'),
  changeOrderInfo?: {
    batchCount?: int32(name='BatchCount', description='The number of batches for the change.', example='1'),
    batchType?: string(name='BatchType', description='Indicates whether the change for the next batch is automatically or manually triggered when phased release is performed. Valid values:

*   Automatic: The change for the next batch is automatically triggered.
*   Manual: The change for the next batch is manually triggered.', example='Automatic'),
    changeOrderDescription?: string(name='ChangeOrderDescription', description='The description of the change process.', example='Application scale-out'),
    changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='1074f3e2-e974-4a0e-****-************'),
    coType?: string(name='CoType', description='The type of the change process.', example='Application Scale Out'),
    createTime?: string(name='CreateTime', description='The time when the change process is created.', example='2019-11-13 14:23:46'),
    createUserId?: string(name='CreateUserId', description='The person in charge of the change process.', example='edas_com***_****@******-*****.***'),
    desc?: string(name='Desc', description='The description of the change process.', example='IP of Scale-Out Instance: 47.107.XX.XX'),
    pipelineInfoList?: {
      pipelineInfo?: [ 
      {
        pipelineId?: string(name='PipelineId', description='The ID of each batch for the change during the phased release.', example='4c4ee320-5e47-4a48-****-************'),
        pipelineName?: string(name='PipelineName', description='The name of the batch.', example='Batch: 1'),
        pipelineStatus?: int32(name='PipelineStatus', description='The state of the change task. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   8: wait for manual confirmation to trigger the next batch during a manual phased release
*   9: wait to trigger the next batch during an automatic phased release
*   10: failed due to a system exception', example='2'),
        stageDetailList?: {
          stageDetailDTO?: [ 
          {
            stageId?: string(name='StageId', description='The ID of the stage.', example='d7561440-10a6-452f-8a90-62f6e7ec****'),
            stageName?: string(name='StageName', description='The name of the stage.', example='Process Start'),
            stageStatus?: int32(name='StageStatus', description='The status of the stage. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   8: wait for manual confirmation to trigger the next batch during a manual phased release
*   9: wait to trigger the next batch during an automatic phased release
*   10: failed due to a system exception', example='2'),
            taskList?: {
              taskInfoDTO?: [ 
              {
                retryType?: int32(name='RetryType', description='The type of the retry policy. Value 0 indicates no retry, value 1 indicates automatic retry, and value 2 indicates manual retry.', example='0'),
                showManualIgnorance?: boolean(name='ShowManualIgnorance', description='Indicates whether errors that occur in the change process are ignored. Valid values:``

*   true: Errors that occur in the change process are ignored. This parameter can be set to true only when URL health checks are performed.
*   false: Errors that occur in the change process are not ignored.', example='false'),
                taskErrorCode?: string(name='TaskErrorCode', description='Error codes', example='400'),
                taskErrorIgnorance?: int32(name='TaskErrorIgnorance', description='Indicates whether the task is error-tolerant. If the task can tolerate errors, the errors that occur in the change process are ignored and the next task is executed.

*   0: The task is not error-tolerant.
*   1: The task is error-tolerant.', example='0'),
                taskErrorMessage?: string(name='TaskErrorMessage', description='The error message for the task.', example='400'),
                taskId?: string(name='TaskId', description='The ID of the task.', example='d6d3b934-90a1-4ae8-8cbd-2446003d****'),
                taskMessage?: string(name='TaskMessage', description='Task information', example='[CALLBACK] 2020-03-11 15:28:44.781  requestId: c952ab99-8c5b-4ff1-9412-ae3bf9b1****, message: success'),
                taskName?: string(name='TaskName', description='The name of the task.', example='Build Image'),
                taskStatus?: string(name='TaskStatus', description='The state of the task. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   8: wait for manual confirmation to trigger the next batch during a manual phased release
*   9: wait to trigger the next batch during an automatic phased release
*   10: failed due to a system exception', example='2'),
              }
            ](name='TaskInfoDTO')
            }(name='TaskList', description='The information about the task.'),
          }
        ](name='StageDetailDTO')
        }(name='StageDetailList', description='The execution results in each stage.'),
        stageList?: {
          stageInfoDTO?: [ 
          {
            stageId?: string(name='StageId', description='The ID of the stage.', example='358a143f-09a0-45e0-****-************@**_*******_*****'),
            stageName?: string(name='StageName', description='The name of the stage.', example='Scale Out'),
            stageResultDTO?: {
              instanceDTOList?: {
                instanceDTO?: [ 
                {
                  instanceIp?: string(name='InstanceIp', description='The IP address of the ECS instance.', example='47.XX.XX.12 (Public)<br>***.**.*.*** (*******)'),
                  instanceName?: string(name='InstanceName', description='The name of the ECS instance.', example='EDAS-scaled'),
                  instanceStageDTOList?: {
                    instanceStageDTO?: [ 
                    {
                      finishTime?: string(name='FinishTime', description='The time when the execution stopped.', example='2020-03-11T07:28:52Z'),
                      stageId?: string(name='StageId', description='The ID of the stage.', example='5dd4c0f2-d81a-406f-****-************'),
                      stageMessage?: string(name='StageMessage', description='The information about the stage.', example='Pulling image \\\\"registry-vpc.cn-hangzhou.aliyuncs.com****-user/1172745****_shared_repo:428084d6-265f-****-911a-7eb0d2c3****_15839117****\\\\'),
                      stageName?: string(name='StageName', description='The name of the stage.', example='scale out'),
                      startTime?: string(name='StartTime', description='The time when the execution was started.', example='2020-03-11T07:28:49Z'),
                      status?: int32(name='Status', description='The state of the stage. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   8: wait for manual confirmation to trigger the next batch during a manual phased release
*   9: wait to trigger the next batch during an automatic phased release
*   10: failed due to a system exception', example='2'),
                    }
                  ](name='InstanceStageDTO')
                  }(name='InstanceStageDTOList', description='The results of the task executed on the ECS instance in each stage.'),
                  podName?: string(name='PodName', description='The name of the node.', example='canary-test'),
                  podStatus?: string(name='PodStatus', description='The state of the pod.', example='In progress'),
                  status?: int32(name='Status', description='The running state. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   8: wait for manual confirmation to trigger the next batch during a manual phased release
*   9: wait to trigger the next batch during an automatic phased release
*   10: failed due to a system exception', example='2'),
                }
              ](name='InstanceDTO')
              }(name='InstanceDTOList', description='The results of the task executed on each Elastic Compute Service (ECS) instance in each stage.'),
              serviceStage?: {
                message?: string(name='Message', description='The execution result in the stage.', example='Success'),
                stageId?: string(name='StageId', description='The ID of the stage.', example='358a143f-09a0-45e0-****-************'),
                stageName?: string(name='StageName', description='Phase Name', example='Enable Tengine'),
                status?: int32(name='Status', description='The running state. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   8: wait for manual confirmation to trigger the next batch during a manual phased release
*   9: wait to trigger the next batch during an automatic phased release
*   10: failed due to a system exception', example='2'),
              }(name='ServiceStage', description='The results of tasks executed in each service-oriented stage.'),
            }(name='StageResultDTO', description='The results of the task executed in the stage.'),
            status?: int32(name='Status', description='The state of the stage. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   8: wait for manual confirmation to trigger the next batch during a manual phased release
*   9: wait to trigger the next batch during an automatic phased release
*   10: failed due to a system exception', example='2'),
          }
        ](name='StageInfoDTO')
        }(name='StageList', description='The stages of the change process.'),
        startTime?: string(name='StartTime', description='The time when the change task was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1583911702158'),
        updateTime?: string(name='UpdateTime', description='The time when the change task was updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1583911743633'),
      }
    ](name='PipelineInfo')
    }(name='PipelineInfoList', description='The information about the batches of the change task.'),
    status?: int32(name='Status', description='The state of the change process. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   7: partially executed
*   8: wait for manual confirmation to trigger the next batch during a manual phased release
*   9: wait to trigger the next batch during an automatic phased release
*   10: failed due to a system exception', example='2'),
    supportRollback?: boolean(name='SupportRollback', description='Indicates whether rollbacks are allowed. Valid values:

*   true: Rollbacks are allowed.
*   false: Rollbacks are not allowed.', example='false'),
    targets?: {
      items?: [ string ](name='Items')
    }(name='Targets'),
    trafficControl?: {
      routes?: string(name='Routes', description='The route forwarding policy.', example='[{"app":"9c8247da-91b6-42bb-8f99-92a0b9c6f****","type":"GROUP"}]'),
      rules?: string(name='Rules', description='The traffic routing rules.', example='[{"conditionType":"content","conditions":[{"key":"name","operator":"EQ","strategy":"PARAM","values":["jim"]},{"key":"name","operator":"EQ","strategy":"COOKIE","values":["jim"]}],"percent":100,"protocol":"SPRINGCLOUD","triggerPolicy":"AND"}]'),
      tips?: string(name='Tips', description='The description of throttling rules.', example='This canary release batch is complete, and the user has confirmed to proceed to the next batch.'),
    }(name='TrafficControl', description='The throttling rules.'),
  }(name='changeOrderInfo', description='The details about the change process.'),
}

model GetChangeOrderInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetChangeOrderInfoResponseBody(name='body'),
}

/**
 * @summary Queries the details about a change process.
 *
 * @param request GetChangeOrderInfoRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetChangeOrderInfoResponse
 */
async function getChangeOrderInfoWithOptions(request: GetChangeOrderInfoRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetChangeOrderInfoResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.changeOrderId)) {
    query['ChangeOrderId'] = request.changeOrderId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetChangeOrderInfo',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/change_order_info`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the details about a change process.
 *
 * @param request GetChangeOrderInfoRequest
 * @return GetChangeOrderInfoResponse
 */
async function getChangeOrderInfo(request: GetChangeOrderInfoRequest): GetChangeOrderInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getChangeOrderInfoWithOptions(request, headers, runtime);
}

model GetClusterRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster in Enterprise Distributed Application Service (EDAS). You can call the ListCluster operation to query the cluster ID. For more information, see [ListCluster](https://help.aliyun.com/document_detail/154995.html).

This parameter is required.', example='5439271a-015b-433d-****-d76db49****'),
}

model GetClusterResponseBody = {
  cluster?: {
    clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='5439271a-015b-433d-befb-d76d****'),
    clusterImportStatus?: int32(name='ClusterImportStatus', description='The import status of the cluster. Valid values:

*   1: The cluster is imported.
*   2: The cluster fails to be imported.
*   3: The cluster is being imported.
*   4: The cluster is deleted.
*   0: The cluster is not imported.', example='0'),
    clusterName?: string(name='ClusterName', description='The name of the cluster.', example='ClusterTest'),
    clusterType?: int32(name='ClusterType', description='The type of the cluster. Valid values:

*   0: regular Docker cluster
*   1: Swarm cluster
*   2: Elastic Compute Service (ECS) cluster
*   3: self-managed Kubernetes cluster in EDAS
*   4: cluster in which Pandora automatically registers applications
*   5: ACK cluster', example='2'),
    cpu?: int32(name='Cpu', description='The total number of CPU cores.', example='4'),
    cpuUsed?: int32(name='CpuUsed', description='The number of used CPU cores.', example='2'),
    createTime?: long(name='CreateTime', description='The time when the cluster was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1570708232145'),
    csClusterId?: string(name='CsClusterId', description='The ID of the Container Service for Kubernetes (ACK) cluster.', example='c2ce62869f4d4466b920312315f05****'),
    description?: string(name='Description', description='The description of the cluster.', example='Test'),
    iaasProvider?: string(name='IaasProvider', description='The provider of Infrastructure as a Service (IaaS) resources used in the cluster.', example='ALIYUN'),
    mem?: int32(name='Mem', description='The total size of memory. Unit: MB.', example='2048'),
    memUsed?: int32(name='MemUsed', description='The size of used memory. Unit: MB.', example='1024'),
    networkMode?: int32(name='NetworkMode', description='The network type of the cluster. Valid values:

*   1: classic network
*   2: virtual private cloud (VPC)', example='2'),
    nodeNum?: int32(name='NodeNum', description='The number of ECS instances.', example='4'),
    oversoldFactor?: int32(name='OversoldFactor', description='The overcommit ratio supported by a Docker cluster. Valid values:

*   1: 1:1, which means that resources are not overcommitted.
*   2: 1:2, which means that resources are overcommitted by 1:2.
*   4: 1:4, which means that resources are overcommitted by 1:4.
*   8: 1:8, which means that resources are overcommitted by 1:8.', example='2'),
    regionId?: string(name='RegionId', description='The ID of the region where the cluster resides.', example='cn-hangzhou'),
    subClusterType?: string(name='SubClusterType', description='The subtype of the Kubernetes cluster. Valid values: ManagedKubernetes, Ask, and ExternalKubernetes. ManagedKubernetes refers to the ACK cluster. Ask refers to the Serverless Kubernetes (ASK) cluster. ExternalKubernetes refers to the external cluster.', example='ManagedKubernetes'),
    updateTime?: long(name='UpdateTime', description='The time when the cluster was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1570708232145'),
    vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC).', example='vpc-xxxxz1mlwpb****'),
  }(name='Cluster', description='The information about the cluster.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The detailed information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='d76db491'),
}

model GetClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterResponseBody(name='body'),
}

/**
 * @summary Queries a specific cluster.
 *
 * @param request GetClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterResponse
 */
async function getClusterWithOptions(request: GetClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetClusterResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCluster',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/cluster`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries a specific cluster.
 *
 * @param request GetClusterRequest
 * @return GetClusterResponse
 */
async function getCluster(request: GetClusterRequest): GetClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getClusterWithOptions(request, headers, runtime);
}

model GetContainerConfigurationRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='3616cdca-4f92-**************'),
  groupId?: string(name='GroupId', description='The ID of the instance group.

*   If this parameter is specified, this operation queries the Tomcat configuration of the instance group.
*   If this parameter is not specified, this operation queries the Tomcat configuration of the application.', example='8123db90-880f-**************'),
}

model GetContainerConfigurationResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  containerConfiguration?: {
    contextPath?: string(name='ContextPath', description='The context path of the Tomcat container.', example='/'),
    httpPort?: int32(name='HttpPort', description='The application port number for the Tomcat container. The value specified in the application configuration is returned.', example='8080'),
    maxThreads?: int32(name='MaxThreads', description='The maximum number of threads in the Tomcat container.

*   If no instance group is specified, the configuration of the application is returned.
*   If no application is specified, the default configuration is returned.', example='400'),
    URIEncoding?: string(name='URIEncoding', description='The Uniform Resource Identifier (URI) encoding scheme. Valid values: ISO-8859-1, GBK, GB2312, and UTF-8.

*   If no instance group is specified, the configuration of the application is returned.
*   If no application is specified, the default configuration is returned.', example='ISO-8859-1'),
    useBodyEncoding?: boolean(name='UseBodyEncoding', description='Indicates whether useBodyEncodingForURI is enabled in the Tomcat container.

*   If no instance group is specified, the configuration of the application is returned.
*   If no application is specified, the default configuration is returned.', example='true'),
  }(name='ContainerConfiguration', description='The Tomcat configuration.'),
  message?: string(name='Message', description='The message returned for the request.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='34F8-FDG9-*****************'),
}

model GetContainerConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetContainerConfigurationResponseBody(name='body'),
}

/**
 * @summary Queries the Tomcat configuration of an application or an instance group in which an application is deployed.
 *
 * @param request GetContainerConfigurationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetContainerConfigurationResponse
 */
async function getContainerConfigurationWithOptions(request: GetContainerConfigurationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetContainerConfigurationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetContainerConfiguration',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/container_config`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the Tomcat configuration of an application or an instance group in which an application is deployed.
 *
 * @param request GetContainerConfigurationRequest
 * @return GetContainerConfigurationResponse
 */
async function getContainerConfiguration(request: GetContainerConfigurationRequest): GetContainerConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getContainerConfigurationWithOptions(request, headers, runtime);
}

model GetJavaStartUpConfigRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='5fdf50e8-*'),
}

model GetJavaStartUpConfigResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  javaStartUpConfig?: {
    originalConfigs?: string(name='OriginalConfigs', description='The displayed startup parameter configuration.', example='-Xms512m'),
    startUpArgs?: string(name='StartUpArgs', description='The effective startup parameter configuration.', example='-Xms512m'),
  }(name='JavaStartUpConfig', description='The configuration of Java startup parameters.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-eiufh'),
}

model GetJavaStartUpConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetJavaStartUpConfigResponseBody(name='body'),
}

/**
 * @summary Queries the configuration of Java startup parameters for an application.
 *
 * @param request GetJavaStartUpConfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetJavaStartUpConfigResponse
 */
async function getJavaStartUpConfigWithOptions(request: GetJavaStartUpConfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetJavaStartUpConfigResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetJavaStartUpConfig',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/oam/java_start_up_config`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configuration of Java startup parameters for an application.
 *
 * @param request GetJavaStartUpConfigRequest
 * @return GetJavaStartUpConfigResponse
 */
async function getJavaStartUpConfig(request: GetJavaStartUpConfigRequest): GetJavaStartUpConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getJavaStartUpConfigWithOptions(request, headers, runtime);
}

model GetJvmConfigurationRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='3616cdca-4f92-4***************'),
  groupId?: string(name='GroupId', description='The ID of the instance group.

*   If an ID is specified, this operation queries the JVM configuration information of the instance group.
*   If an ID is not specified, this operation queries the JVM configuration information of the application.', example='8123db90-880f-48**************'),
}

model GetJvmConfigurationResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  jvmConfiguration?: {
    maxHeapSize?: int32(name='MaxHeapSize', description='The maximum size of the heap memory. Unit: MB.', example='1000'),
    maxPermSize?: int32(name='MaxPermSize', description='The size of the permanent generation heap memory. Unit: MB.', example='1000'),
    minHeapSize?: int32(name='MinHeapSize', description='The initial size of the heap memory. Unit: MB.', example='500'),
    options?: string(name='Options', description='The custom parameter.', example='-XX:+UseConcMarkSweepGC -XX:-UseParNewGC'),
  }(name='JvmConfiguration', description='The JVM configuration of the application or instance group.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='3F43-F34V-0VCD***********'),
}

model GetJvmConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetJvmConfigurationResponseBody(name='body'),
}

/**
 * @summary Queries the Java Virtual Machine (JVM) configuration of an application or an instance group in which an application is deployed.
 *
 * @param request GetJvmConfigurationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetJvmConfigurationResponse
 */
async function getJvmConfigurationWithOptions(request: GetJvmConfigurationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetJvmConfigurationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetJvmConfiguration',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/app_jvm_config`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the Java Virtual Machine (JVM) configuration of an application or an instance group in which an application is deployed.
 *
 * @param request GetJvmConfigurationRequest
 * @return GetJvmConfigurationResponse
 */
async function getJvmConfiguration(request: GetJvmConfigurationRequest): GetJvmConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getJvmConfigurationWithOptions(request, headers, runtime);
}

model GetK8sAppPrecheckResultRequest {
  appName?: string(name='AppName', description='The name of the application.

This parameter is required.', example='testapp'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster in Enterprise Distributed Application Service (EDAS).

This parameter is required.', example='c37aec2a-bcca-4ec1-****-************'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.

This parameter is required.', example='default'),
}

model GetK8sAppPrecheckResultResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    jobResults?: [ 
      {
        interrupted?: boolean(name='Interrupted', description='Specifies whether the precheck of the item was interrupted:

*   true: The precheck of the item was interrupted.
*   false: The precheck of the item was not interrupted.', example='false'),
        name?: string(name='Name', description='The name of the precheck item.', example='Cluster Health Check'),
        pass?: boolean(name='Pass', description='Indicates whether the precheck item passed the precheck:

*   true: The precheck item passed the precheck.
*   false: The precheck item failed the precheck.', example='true'),
        reason?: string(name='Reason', description='The reason why the precheck item failed the precheck or the precheck of the item was interrupted. This parameter is left empty when the application passed the precheck.', example='The Kubernetes cluster is disconnected from the EDAS control plane.'),
      }
    ](name='JobResults', description='The precheck result for the application change.'),
    reason?: string(name='Reason', description='The reason why the application failed the precheck. This parameter is left empty when the application passed the precheck.', example='The Kubernetes cluster is disconnected from the EDAS control plane.'),
    status?: string(name='Status', description='The precheck state for the application change. Valid values:

*   checking: The application is being prechecked.
*   pass: The application passed the precheck.
*   failed: The application failed the precheck.', example='checking'),
  }(name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='B909AB1F-3763-4963-B1CE-0BDFA192****'),
}

model GetK8sAppPrecheckResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetK8sAppPrecheckResultResponseBody(name='body'),
}

/**
 * @summary Queries the precheck result of a Kubernetes application.
 *
 * @param request GetK8sAppPrecheckResultRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetK8sAppPrecheckResultResponse
 */
async function getK8sAppPrecheckResultWithOptions(request: GetK8sAppPrecheckResultRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetK8sAppPrecheckResultResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetK8sAppPrecheckResult',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/app_precheck`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the precheck result of a Kubernetes application.
 *
 * @param request GetK8sAppPrecheckResultRequest
 * @return GetK8sAppPrecheckResultResponse
 */
async function getK8sAppPrecheckResult(request: GetK8sAppPrecheckResultRequest): GetK8sAppPrecheckResultResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getK8sAppPrecheckResultWithOptions(request, headers, runtime);
}

model GetK8sApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='5a166fbd-****-4f98-a286-781659d9****'),
  from?: string(name='From', description='The source from which data is queried.

*   If you leave this parameter empty, a common query is performed.
*   If you set the value to deploy, you query application information from the deployment page.', example='deploy'),
}

model GetK8sApplicationResponseBody = {
  applcation?: {
    app?: {
      annotations?: string(name='Annotations', description='The annotation of an application pod.', example='{"test-annokey":"test-annovalue"}'),
      appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='00ee517d-dd7d-4d4e-****-****'),
      applicationName?: string(name='ApplicationName', description='The name of the application.', example='test'),
      applicationType?: string(name='ApplicationType', description='The type of the application.', example='War'),
      buildpackId?: int32(name='BuildpackId', description='The build package number of Enterprise Distributed Application Service (EDAS) Container.', example='57'),
      clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='c37aec2a-bcca-4ec1-****-****'),
      cmd?: string(name='Cmd', description='The startup command.', example='ls'),
      cmdArgs?: {
        cmdArg?: [ string ](name='CmdArg')
      }(name='CmdArgs', description='The list of commands.'),
      csClusterId?: string(name='CsClusterId', description='The ID of the cluster to which the container belongs.', example='c383bc813c1974e****451b50c0c8****'),
      deployType?: string(name='DeployType', description='The deployment type of the application. Example: Image.', example='Image'),
      developType?: string(name='DevelopType', description='The application type. Valid values:

*   General: native Java application
*   Pandora: Pandora application
*   Multilingual: multilingual application', example='General'),
      edasContainerVersion?: string(name='EdasContainerVersion', description='The version of EDAS Container.', example='3.60.0'),
      enableEmptyPushReject?: boolean(name='EnableEmptyPushReject', description='Indicates whether the Empty List Protection feature is enabled for the application.', example='true'),
      enableLosslessRule?: boolean(name='EnableLosslessRule', description='Indicates whether the Graceful Release feature is enabled for the application.', example='true'),
      envList?: {
        env?: [ 
        {
          name?: string(name='Name', description='The name of the environment variable.', example='CATALINA_OPTS'),
          value?: string(name='Value', description='The value of the environment variable.', example='-Xmx 1024m -Dhsf.default.tid=false $(EDAS_CATALINA_OPTS)'),
        }
      ](name='Env')
      }(name='EnvList', description='The list of environment variables.'),
      featureAnnotations?: string(name='FeatureAnnotations', description='The feature annotations. Possible values:

*   base.combination.edas: enables EDAS integrated management solution.
*   base.combination.arms: enables ARMS monitoring.
*   base.combination.mse: enables MSE microservices governance.
*   base.combination.none: enables lifecycle management.', example='base.combination.edas'),
      instances?: int32(name='Instances', description='The number of application instances.', example='4'),
      instancesBeforeScaling?: int32(name='InstancesBeforeScaling', description='The number of application instances before the last auto scaling operation.', example='10'),
      k8sNamespace?: string(name='K8sNamespace', description='The namespace of the Kubernetes cluster.', example='default'),
      labels?: string(name='Labels', description='The label of an application pod.', example='{"test-labelkey":"test-labelvalue"}'),
      limitCpuM?: int32(name='LimitCpuM', description='The maximum number of CPU cores allowed. Unit: millicores. 1,000 millicores equal one CPU core.', example='1000'),
      limitEphemeralStorage?: string(name='LimitEphemeralStorage', description='The maximum size of space required by ephemeral storage. Unit: GB. Value 0 indicates that no limit is set on the space size.', example='4'),
      limitMem?: int32(name='LimitMem', description='The maximum size of the memory allowed. Unit: MiB.', example='1024'),
      losslessRuleAligned?: boolean(name='LosslessRuleAligned', description='Indicates whether the Graceful Rolling Release and Configure Complete Service Registration before Readiness Probing feature is enabled for the application.', example='true'),
      losslessRuleDelayTime?: int32(name='LosslessRuleDelayTime', description='The delay of service registration. Unit: seconds.', example='120'),
      losslessRuleFuncType?: int32(name='LosslessRuleFuncType', description='The number of prefetching curves.', example='2'),
      losslessRuleRelated?: boolean(name='LosslessRuleRelated', description='Indicates whether the Graceful Rolling Release and Configure Complete Service Prefetching before Readiness Probing feature is enabled for the application.', example='true'),
      losslessRuleWarmupTime?: int32(name='LosslessRuleWarmupTime', description='The service prefetching duration. Unit: seconds.', example='120'),
      regionId?: string(name='RegionId', description='The ID of the region.', example='cn-hangzhou'),
      requestCpuM?: int32(name='RequestCpuM', description='The number of requested CPU cores. Unit: millicores. 1,000 millicores equal one CPU core.', example='1000'),
      requestEphemeralStorage?: string(name='RequestEphemeralStorage', description='The size of space reserved for ephemeral storage resources. Unit: GB. Value 0 indicates that no limit is set on the space size.', example='2'),
      requestMem?: int32(name='RequestMem', description='The size of the reserved memory. Unit: MiB.', example='1024'),
      slbInfo?: string(name='SlbInfo', description='The configuration information about the Server Load Balancer (SLB).', example='[
  {
    "addressType": "intranet",
    "externalTrafficPolicy": "Local",
    "ip": "192.168.254.***",
    "name": "intranet-testapp",
    "portMappings": [
      {
        "loadBalancerProtocol": "TCP",
        "servicePort": {
          "port": 8080,
          "protocol": "TCP",
          "targetPort": 18081,
          "vServerGroupName": "k8s/31414/intranet-testapp/default/cc90e0c9508a44667bdae2e83d3******"
        }
      }
    ],
    "scheduler": "rr",
    "serviceType": "LoadBalancer",
    "slbId": "lb-bp1ikoh3nrpgqsm******",
    "source": "create",
    "specification": "slb.s3.large"
  }
]'),
      tomcatVersion?: string(name='TomcatVersion', description='The version of Apache Tomcat.', example='8.5.55'),
      workloadType?: string(name='WorkloadType', description='The workload type. Valid values: Deployment and StatefulSet. If you do not specify this parameter, Deployment is used.', example='Deployment'),
    }(name='App', description='The basic information about the application.'),
    appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='a5281053-****-47a5-b2ab-5c0323de****'),
    conf?: {
      affinity?: string(name='Affinity', description='The affinity configuration of the pod.', example='"{\\\\"nodeAffinity\\\\":{\\\\"requiredDuringSchedulingIgnoredDuringExecution\\\\":{\\\\"nodeSelectorTerms\\\\":[{\\\\"matchExpressions\\\\":[{\\\\"key\\\\":\\\\"beta.kubernetes.io/arch\\\\",\\\\"operator\\\\":\\\\"NotIn\\\\",\\\\"values\\\\":[\\\\"arm64\\\\",\\\\"arm32\\\\"]}]}]},\\\\"preferredDuringSchedulingIgnoredDuringExecution\\\\":[{\\\\"weight\\\\":5,\\\\"preference\\\\":{\\\\"matchExpressions\\\\":[{\\\\"key\\\\":\\\\"kubernetes.io/os\\\\",\\\\"operator\\\\":\\\\"In\\\\",\\\\"values\\\\":[\\\\"linux\\\\"]}]}}]},\\\\"podAffinity\\\\":{\\\\"requiredDuringSchedulingIgnoredDuringExecution\\\\":[{\\\\"labelSelector\\\\":{\\\\"matchExpressions\\\\":[{\\\\"key\\\\":\\\\"edas.oam.acname\\\\",\\\\"operator\\\\":\\\\"NotIn\\\\",\\\\"values\\\\":[\\\\"edas-test-app\\\\"]}]},\\\\"namespaces\\\\":[\\\\"default\\\\"],\\\\"topologyKey\\\\":\\\\"kubernetes.io/hostname\\\\"}]},\\\\"podAntiAffinity\\\\":{\\\\"preferredDuringSchedulingIgnoredDuringExecution\\\\":[{\\\\"weight\\\\":15,\\\\"podAffinityTerm\\\\":{\\\\"labelSelector\\\\":{\\\\"matchExpressions\\\\":[{\\\\"key\\\\":\\\\"edas.oam.acname\\\\",\\\\"operator\\\\":\\\\"In\\\\",\\\\"values\\\\":[\\\\"edas-test-app-2\\\\"]}]},\\\\"namespaces\\\\":[\\\\"default\\\\"],\\\\"topologyKey\\\\":\\\\"failure-domain.beta.kubernetes.io/zone\\\\"}}]}}"'),
      ahasEnabled?: boolean(name='AhasEnabled', description='Indicates whether the application is connected to Application High Availability Service (AHAS).', example='true'),
      deployAcrossNodes?: string(name='DeployAcrossNodes', description='Indicates whether the application instances are deployed across nodes.

*   Value `true` indicates that the application instances are deployed across nodes.
*   Other values indicate that the application instances are not deployed across nodes.', example='true'),
      deployAcrossZones?: string(name='DeployAcrossZones', description='Indicates whether the application instances are deployed across zones.

*   Value `true` indicates that the application instances are deployed across zones.
*   Other values indicate that the application instances are not deployed across zones.', example='true'),
      jarStartArgs?: string(name='JarStartArgs', description='The startup parameters for a JAR application. This parameter is deprecated.', example='-lh'),
      jarStartOptions?: string(name='JarStartOptions', description='The startup options for a JAR application. This parameter is deprecated.', example='-h'),
      k8sCmd?: string(name='K8sCmd', description='The startup command.', example='ls'),
      k8sCmdArgs?: string(name='K8sCmdArgs', description='The parameters of the startup command.', example='-lh'),
      k8sLocalvolumeInfo?: string(name='K8sLocalvolumeInfo', description='The information about the local storage.', example='[{"type":"","nodePath":"/mnt/","mountPath":"/mnt/"}]'),
      k8sNasInfo?: string(name='K8sNasInfo', description='The information about the Apsara File Storage NAS (NAS) storage.', example='[{"nasPath":"/mnt/","mountPath":"/mnt/"}]'),
      k8sVolumeInfo?: string(name='K8sVolumeInfo', description='The information about the storage.', example='"{\\\\"hostPaths\\\\":\\\\"[]\\\\",\\\\"emptyDirs\\\\":\\\\"[]\\\\"}"'),
      liveness?: string(name='Liveness', description='The information about the liveness check on the container.', example='{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}}'),
      postStart?: string(name='PostStart', description='The script executed after the container is started.', example='{\\\\"exec\\\\":{\\\\"command\\\\":[\\\\"ls\\\\",\\\\"/\\\\"]}}"'),
      preStop?: string(name='PreStop', description='The script executed before the container is stopped.', example='{\\\\"exec\\\\":{\\\\"command\\\\":[\\\\"ls\\\\",\\\\"/\\\\"]}}"'),
      readiness?: string(name='Readiness', description='The information about the readiness check on the container.', example='{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": [{"name": "test","value": "testvalue"}\\\\]}}'),
      runtimeClassName?: string(name='RuntimeClassName', description='The type of the container runtime. This parameter is applicable only to clusters that use sandboxed containers.', example='runc'),
      tolerations?: string(name='Tolerations', description='The scheduling tolerance configuration of the pod.', example='"[{\\\\"key\\\\":\\\\"edas-taint-key2\\\\",\\\\"operator\\\\":\\\\"Exists\\\\",\\\\"effect\\\\":\\\\"NoExecute\\\\",\\\\"tolerationSeconds\\\\":50},{\\\\"key\\\\":\\\\"edas-taint-key\\\\",\\\\"operator\\\\":\\\\"Equal\\\\",\\\\"value\\\\":\\\\"edas-taint-value\\\\",\\\\"effect\\\\":\\\\"PreferNoSchedule\\\\"}]"'),
      userBaseImageUrl?: string(name='UserBaseImageUrl', description='The URL of the base image. If you use a custom Java Development Kit (JDK) runtime, you must specify this parameter.', example='openjdk:8u302'),
    }(name='Conf', description='The configurations.'),
    deployGroups?: {
      deployGroup?: [ 
      {
        components?: {
          components?: [ 
          {
            componentId?: string(name='ComponentId', description='The component ID.', example='5'),
            componentKey?: string(name='ComponentKey', description='The keyword that is included in the component name.', example='Open JDK 8'),
            type?: string(name='Type', description='The component type. Valid values:', example='JDK'),
          }
        ](name='Components')
        }(name='Components', description='The information about the component.'),
        env?: string(name='Env', description='The environment variable. This parameter is different from the EnvList parameter. This parameter specifies the referenced configuration of the ConfigMap or Secret.', example='"["{\\\\"name\\\\":\\\\"test1\\\\",\\\\"valueFrom\\\\":{\\\\"configMapKeyRef\\\\":{\\\\"name\\\\":\\\\"edas-demo-configmap\\\\",\\\\"key\\\\":\\\\"key1\\\\"}}}","{\\\\"name\\\\":\\\\"k2\\\\",\\\\"value\\\\":\\\\"v2\\\\"}","{\\\\"name\\\\":\\\\"s1\\\\",\\\\"valueFrom\\\\":{\\\\"secretKeyRef\\\\":{\\\\"name\\\\":\\\\"edas-demo-secret\\\\",\\\\"key\\\\":\\\\"k1\\\\"}}}"]"'),
        envFrom?: string(name='EnvFrom', description='The source of the environment variable.', example='[{"configMapRef":{"name":"test-cm"}}]'),
      }
    ](name='DeployGroup')
    }(name='DeployGroups', description='The information about the instance group in which the application is deployed.'),
    imageInfo?: {
      imageUrl?: string(name='ImageUrl', description='The URL of the image.', example='registry.cn-beijing.aliyuncs.com/edas-serverless-****/1314839****06888_shared_repo:5a166fbd-9d76-4f98-****-78165****c_1572***282'),
      regionId?: string(name='RegionId', description='The region ID of the image repository.', example='cn-beijing'),
      repoId?: string(name='RepoId', description='The ID of the image repository.', example='cn-hangzhou'),
      repoName?: string(name='RepoName', description='The name of the image repository.', example='131****067006888_shared_repo'),
      repoNamespace?: string(name='RepoNamespace', description='The namespace to which the image repository belongs.', example='edas-server****-user'),
      repoOriginType?: string(name='RepoOriginType', description='The source type of the image repository.', example='ALI_HUB'),
      tag?: string(name='Tag', description='The tag of the image.', example='5a166fbd-9d76-4f98-****-781659d9f54c_1572485443282'),
    }(name='ImageInfo', description='The information about the image.'),
    latestVersion?: {
      packageVersion?: string(name='PackageVersion', description='The version of the deployment package.', example='20200720'),
      url?: string(name='Url', description='The URL of the deployment package. This parameter is required if you use a FatJar or WAR package to deploy the application.', example='https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar'),
      warUrl?: string(name='WarUrl', description='The URL of the deployment package. This parameter is required if you use a FatJar or WAR package to deploy the application.', example='https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar'),
    }(name='LatestVersion', description='The information about the latest version.'),
  }(name='Applcation', description='The information about the application.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='1053-08e4-47a5-b2ab-5c0323de7b5a'),
}

model GetK8sApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetK8sApplicationResponseBody(name='body'),
}

/**
 * @summary Queries the information about applications deployed in a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster.
 *
 * @param request GetK8sApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetK8sApplicationResponse
 */
async function getK8sApplicationWithOptions(request: GetK8sApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetK8sApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.from)) {
    query['From'] = request.from;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetK8sApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_application`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the information about applications deployed in a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster.
 *
 * @param request GetK8sApplicationRequest
 * @return GetK8sApplicationResponse
 */
async function getK8sApplication(request: GetK8sApplicationRequest): GetK8sApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getK8sApplicationWithOptions(request, headers, runtime);
}

model GetK8sClusterRequest {
  clusterType?: int32(name='ClusterType', description='The type of the Kubernetes cluster. Valid values:

*   5: ACK cluster
*   7: self-managed Kubernetes cluster', example='5'),
  currentPage?: int32(name='CurrentPage', description='The number of the page to return. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: 1000.', example='10'),
  regionTag?: string(name='RegionTag', description='The ID of the region.

This parameter is required.', example='cn-hangzhou'),
  subClusterType?: string(name='SubClusterType', description='The subtype of the cluster. Valid values:

*   Ask: Serverless Kubernetes cluster
*   ManagedKubernetes: ACK cluster', example='Ask'),
}

model GetK8sClusterResponseBody = {
  clusterPage?: {
    clusterList?: {
      cluster?: [ 
      {
        clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='81453e4b-4df0-4592-****-b835a2ee****'),
        clusterImportStatus?: int32(name='ClusterImportStatus', description='The import state of the cluster. Valid values:

*   0: The cluster is not imported.
*   1: The cluster is imported.
*   2: The cluster fails to be imported.
*   3: The cluster is being imported.
*   4: The cluster is deleted.', example='1'),
        clusterName?: string(name='ClusterName', description='The name of the cluster.', example='test'),
        clusterStatus?: int32(name='ClusterStatus', description='The status of the cluster. Valid values:

*   1: The cluster runs as expected.
*   2: The cluster does not run as expected.
*   3: The cluster is offline.', example='1'),
        clusterType?: int32(name='ClusterType', description='The type of the cluster. Valid values:

*   2: Elastic Compute Service (ECS) cluster
*   5: ACK cluster or Serverless Kubernetes cluster', example='5'),
        cpu?: int32(name='Cpu', description='The total number of CPU cores.', example='4'),
        csClusterId?: string(name='CsClusterId', description='The ID of the ACK cluster.', example='2ce62869f4d4466b920312315f05****'),
        csClusterStatus?: string(name='CsClusterStatus', description='The state of the ACK cluster. Valid values:

*   initial: The cluster is being initialized.
*   failed: The cluster fails to be created.
*   running: The cluster is running.
*   updating: The cluster is being updated.
*   scaling: The cluster is being scaled out.
*   removing: Nodes are being removed from the cluster.
*   upgrading: The cluster is being upgraded.
*   deleting: The cluster is being deleted.
*   delete_failed: The cluster fails to be deleted.
*   deleted: The cluster is deleted. The deleted cluster is invisible to users.', example='running'),
        description?: string(name='Description', description='The description of the cluster.', example='test'),
        mem?: int32(name='Mem', description='The total size of memory. Unit: MB.', example='2048'),
        networkMode?: int32(name='NetworkMode', description='The network type of the cluster. Valid values:

*   1: classic network
*   2: VPC', example='2'),
        nodeNum?: int32(name='NodeNum', description='The number of nodes.', example='4'),
        regionId?: string(name='RegionId', description='The ID of the namespace.', example='test'),
        subClusterType?: string(name='SubClusterType', description='The subtype of the cluster. Valid values:

*   Ask: Serverless Kubernetes cluster
*   ManagedKubernetes: ACK cluster', example='Ask'),
        subNetCidr?: string(name='SubNetCidr', description='The CIDR block of the subnet.', example='172.20.0.0/16'),
        vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC).', example='vpc-**z1mlwpbjx3e9m**'),
        vswitchId?: string(name='VswitchId', description='The ID of the vSwitch.', example='vsw-bp1uf97****xjxgip****'),
      }
    ](name='Cluster')
    }(name='ClusterList', description='The list of clusters.'),
    currentPage?: int32(name='CurrentPage', description='The number of the returned page. Default value: 1.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of entries returned per page. Default value: 1000.', example='10'),
    totalSize?: int32(name='TotalSize', description='The total number of pages that are returned.', example='5'),
  }(name='ClusterPage', description='The cluster data that is returned by page.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='C3CE915C-0C83-4AA5-8D66-E8BEED62939E'),
}

model GetK8sClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetK8sClusterResponseBody(name='body'),
}

/**
 * @summary Queries Container Service for Kubernetes (ACK) clusters or Serverless Kubernetes clusters in a specified region.
 *
 * @param request GetK8sClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetK8sClusterResponse
 */
async function getK8sClusterWithOptions(request: GetK8sClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetK8sClusterResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterType)) {
    query['ClusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionTag)) {
    query['RegionTag'] = request.regionTag;
  }
  if (!Util.isUnset(request.subClusterType)) {
    query['SubClusterType'] = request.subClusterType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetK8sCluster',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s_clusters`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Container Service for Kubernetes (ACK) clusters or Serverless Kubernetes clusters in a specified region.
 *
 * @param request GetK8sClusterRequest
 * @return GetK8sClusterResponse
 */
async function getK8sCluster(request: GetK8sClusterRequest): GetK8sClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getK8sClusterWithOptions(request, headers, runtime);
}

model GetK8sServicesRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='5a166fbd-****-****-a286-781659d9f54c'),
}

model GetK8sServicesResponseBody = {
  code?: int32(name='Code', description='The ID of the change process.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-eiufh'),
  services?: [ 
    {
      clusterIP?: string(name='ClusterIP', description='The IP address of the service in the Kubernetes cluster.', example='104.23.xx.xx'),
      name?: string(name='Name', description='The name of the service.', example='service-http'),
      servicePorts?: [ 
        {
          nodePort?: int32(name='NodePort', description='The port of the node.', example='0'),
          port?: int32(name='Port', description='The frontend service port.', example='80'),
          protocol?: string(name='Protocol', description='The protocol of the service.', example='TCP'),
          targetPort?: string(name='TargetPort', description='The backend container port.', example='8080'),
        }
      ](name='ServicePorts', description='The mapping of service ports.'),
      type?: string(name='Type', description='The type of the service.', example='ClusterIP'),
    }
  ](name='Services', description='The list of services in the Kubernetes cluster.'),
}

model GetK8sServicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetK8sServicesResponseBody(name='body'),
}

/**
 * @summary Queries application services that are deployed in a Kubernetes cluster.
 *
 * @param request GetK8sServicesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetK8sServicesResponse
 */
async function getK8sServicesWithOptions(request: GetK8sServicesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetK8sServicesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetK8sServices',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_service`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries application services that are deployed in a Kubernetes cluster.
 *
 * @param request GetK8sServicesRequest
 * @return GetK8sServicesResponse
 */
async function getK8sServices(request: GetK8sServicesRequest): GetK8sServicesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getK8sServicesWithOptions(request, headers, runtime);
}

model GetPackageStorageCredentialResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  credential?: {
    accessKeyId?: string(name='AccessKeyId', description='The AccessKey ID of your account.', example='<yourAccessKeyId>'),
    accessKeySecret?: string(name='AccessKeySecret', description='The AccessKey secret of your account.', example='<yourAccessKeySecret>'),
    bucket?: string(name='Bucket', description='The name of the OSS bucket.', example='edas-bj'),
    expiration?: string(name='Expiration', description='The time when the STS credential expires. Example: 2019-11-10T07:20:19Z.', example='2019-11-10T07:20:19Z'),
    keyPrefix?: string(name='KeyPrefix', description='The object key prefix in Object Storage Service (OSS).', example='release-pkg/117274586608****'),
    ossInternalEndpoint?: string(name='OssInternalEndpoint', description='The private endpoint of OSS.', example='oss-cn-beijing-internal.aliyuncs.com'),
    ossPublicEndpoint?: string(name='OssPublicEndpoint', description='The public endpoint of OSS.', example='oss-cn-beijing.aliyuncs.com'),
    ossVpcEndpoint?: string(name='OssVpcEndpoint', description='The VPC endpoint of OSS.', example='oss-cn-beijing-internal.aliyuncs.com'),
    regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
    securityToken?: string(name='SecurityToken', description='The security token issued by STS.', example='<yourSecurityToken>'),
  }(name='Credential', description='The STS credential.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
}

model GetPackageStorageCredentialResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPackageStorageCredentialResponseBody(name='body'),
}

/**
 * @summary Queries the Security Token Service (STS) tokens that are required for temporary storage.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPackageStorageCredentialResponse
 */
async function getPackageStorageCredentialWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): GetPackageStorageCredentialResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'GetPackageStorageCredential',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/package_storage_credential`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the Security Token Service (STS) tokens that are required for temporary storage.
 *
 * @return GetPackageStorageCredentialResponse
 */
async function getPackageStorageCredential(): GetPackageStorageCredentialResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getPackageStorageCredentialWithOptions(headers, runtime);
}

model GetScalingRulesRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='33e39be9-3e5f-*********'),
  groupId?: string(name='GroupId', description='The ID of the instance group to which the application is deployed.

This parameter is required.', example='d8bb9d60-9**************'),
  mode?: string(name='Mode', description='The type of the scaling rule. You can leave this parameter empty. Valid values:

*   SCALE_IN: scale-in rules
*   SCALE_OUT: scale-out rules', example='SCALE_IN'),
}

model GetScalingRulesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    clusterType?: int32(name='ClusterType', description='The type of the cluster. Valid values:

*   0: regular Docker cluster
*   1: Swarm cluster (deprecated)
*   2: Elastic Compute Service (ECS) cluster
*   3: self-managed Kubernetes cluster in EDAS
*   4: cluster in which Pandora automatically registers applications
*   5: Container Service for Kubernetes (ACK) clusters', example='2'),
    oversoldFactor?: int32(name='OversoldFactor', description='The overcommit ratio supported by a Docker cluster. Valid values:

*   1: 1:1, which means that resources are not overcommitted.
*   2: 1:2, which means that resources are overcommitted by 1:2.
*   4: 1:4, which means that resources are overcommitted by 1:4.
*   8: 1:8, which means that resources are overcommitted by 1:8.', example='1'),
    ruleList?: {
      rule?: [ 
      {
        appId?: string(name='AppId', description='The ID of the application.', example='33e39be9-3e5f-*********'),
        cond?: string(name='Cond', description='The relationship among the conditions that trigger the scaling rule.

*   OR: one of the conditions
*   AND: all conditions', example='OR'),
        cpu?: int32(name='Cpu', description='The minimum CPU utilization that triggers the scaling rule.', example='1'),
        createTime?: long(name='CreateTime', description='The time when the scaling rule was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1574251601801'),
        duration?: int32(name='Duration', description='The duration of the scaling rule. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1574251601'),
        enable?: boolean(name='Enable', description='Indicates whether scale-ins or scale-outs are allowed. Valid values:

*   true: Scale-ins or scale-outs are allowed.
*   false: Scale-ins or scale-outs are disallowed.', example='true'),
        groupId?: string(name='GroupId', description='The ID of the instance group to which the application is deployed.', example='d8bb9d60-91b5-4cdf-****-************'),
        instNum?: int32(name='InstNum', description='The maximum number of instances in the group when a scale-out is performed, or the minimum number of instances in the group when a scale-in is performed.', example='2'),
        loadNum?: int32(name='LoadNum', description='The system load that triggers the scaling rule. The system load is evaluated based on the number of processes that are being executed by CPUs and the number of processes that wait to be executed by CPUs.', example='1'),
        metricType?: string(name='MetricType', description='The type of the metric.', example='HSF'),
        mode?: string(name='Mode', description='The type of the scaling rule. Valid values:

*   SCALE_IN: scale-in rules
*   SCALE_OUT: scale-out rules', example='SCALE_OUT'),
        multiAzPolicy?: string(name='MultiAzPolicy', description='The policy of auto scaling across multiple zones. Valid values:

*   PRIORITY: The vSwitch that is first selected has the highest priority.
*   BALANCE: This policy evenly distributes instances across zones in which the vSwitches reside.', example='PRIORITY'),
        resourceFrom?: string(name='ResourceFrom', description='The source of the instance that you want to add during a scale-out. Valid values:

*   NEW: Elastic resources are used.
*   AVAILABLE: The existing resources are used.
*   AVAILABLE_FIRST: The existing resources are used first.', example='AVAILABLE'),
        rt?: int32(name='Rt', description='The service latency that triggers the scaling rule. Unit: milliseconds.', example='1'),
        specId?: string(name='SpecId', description='The ID of the specification.', example='03f493c0-xxxx-xxxx-xxxx-12e85cadeb41'),
        step?: int32(name='Step', description='The number of instances that are added during each scale-out or removed during each scale-in.', example='1'),
        templateId?: string(name='TemplateId', description='The ID of the launch template.', example='lt-bp1xxxxn73pxxxxf83l'),
        templateVersion?: int32(name='TemplateVersion', description='The version of the launch template.', example='1143542'),
        updateTime?: long(name='UpdateTime', description='The time when the scaling rule was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1574251601785'),
        vSwitchIds?: string(name='VSwitchIds', description='The IDs of the vSwitches. The IDs of multiple vSwitches are separated by commas (,).', example='vsw-mxxxxkxxxx4xxxxwbionj'),
        vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-wz9b246z******'),
      }
    ](name='Rule')
    }(name='RuleList', description='The array data of the scaling rule.'),
    updateTime?: long(name='UpdateTime', description='The time when the scaling rule was last updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1574251601785'),
    vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC).', example='vpc-wz9b246z******'),
  }(name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-***********'),
  updateTime?: long(name='UpdateTime', description='The time when the scaling rule was last updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1574251601785'),
}

model GetScalingRulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetScalingRulesResponseBody(name='body'),
}

/**
 * @summary Queries scaling rules.
 *
 * @param request GetScalingRulesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetScalingRulesResponse
 */
async function getScalingRulesWithOptions(request: GetScalingRulesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetScalingRulesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.mode)) {
    query['Mode'] = request.mode;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetScalingRules',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/scalingRules`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries scaling rules.
 *
 * @param request GetScalingRulesRequest
 * @return GetScalingRulesResponse
 */
async function getScalingRules(request: GetScalingRulesRequest): GetScalingRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getScalingRulesWithOptions(request, headers, runtime);
}

model GetSecureTokenRequest {
  namespaceId?: string(name='NamespaceId', description='The ID of the namespace, such as cn-beijing or cn-beijing:prod````.

This parameter is required.', example='cn-shenzhen:x*****'),
}

model GetSecureTokenResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message returned for the request.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-*************'),
  secureToken?: {
    accessKey?: string(name='AccessKey', description='The AccessKey ID used in the namespace.', example='f676f1**************'),
    addressServerHost?: string(name='AddressServerHost', description='The address of Address Server associated with the namespace.', example='addr-****-****.edas.aliyun.com'),
    belongRegion?: string(name='BelongRegion', description='The ID of the region.', example='cn-shenzhen'),
    description?: string(name='Description', description='The description of the namespace.', example='”“'),
    edasId?: string(name='EdasId', description='The ID of the Alibaba Cloud account that activated Enterprise Distributed Application Service (EDAS).', example='11727458********'),
    id?: long(name='Id', description='The ID of the security token.', example='7279'),
    mseInstanceId?: string(name='MseInstanceId', description='The ID of the MSE instance.', example='mse_prepaid_public_cn-tl32p******'),
    mseInternetAddress?: string(name='MseInternetAddress', description='The public endpoint of the MSE registry.', example='mse-aa2******-p.nacos-ans.mse.aliyuncs.com'),
    mseIntranetAddress?: string(name='MseIntranetAddress', description='The private endpoint of the MSE registry.', example='mse-72******-nacos-ans.mse.aliyuncs.com'),
    mseRegistryType?: string(name='MseRegistryType', description='The type of the Microservices Engine (MSE) registry.

*   default: the shared registry of EDAS
*   exclusive_mse: MSE Nacos registry', example='exclusive_mse'),
    regionId?: string(name='RegionId', description='The ID of the region where the namespace resides.', example='cn-shenzhen:x*******'),
    regionName?: string(name='RegionName', description='The name of the region where the namespace resides.', example='x******'),
    secretKey?: string(name='SecretKey', description='The AccessKey secret used in the namespace.', example='gOSgbgR2R*************'),
    tenantId?: string(name='TenantId', description='The tenant ID of the namespace.', example='401b7bc8-9441-4693-****-************'),
    userId?: string(name='UserId', description='The ID of the user.', example='edas_com***_****@******-*****.***'),
  }(name='SecureToken', description='The returned security token.'),
}

model GetSecureTokenResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSecureTokenResponseBody(name='body'),
}

/**
 * @summary Queries the security token information of a namespace. You can call this operation to query information, such as the AccessKey ID, AccessKey secret, tenant ID, and the domain name of Address Server, for the specified namespace.
 *
 * @param request GetSecureTokenRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSecureTokenResponse
 */
async function getSecureTokenWithOptions(request: GetSecureTokenRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetSecureTokenResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.namespaceId)) {
    query['NamespaceId'] = request.namespaceId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetSecureToken',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/secure_token`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the security token information of a namespace. You can call this operation to query information, such as the AccessKey ID, AccessKey secret, tenant ID, and the domain name of Address Server, for the specified namespace.
 *
 * @param request GetSecureTokenRequest
 * @return GetSecureTokenResponse
 */
async function getSecureToken(request: GetSecureTokenRequest): GetSecureTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getSecureTokenWithOptions(request, headers, runtime);
}

model GetServiceConsumersPageRequest {
  appId?: string(name='appId', description='The ID of the application.', example='efbda488-7b33-432f-a40d-****0047****'),
  group?: string(name='group', description='The service group.', example='DUBBO'),
  ip?: string(name='ip', description='The IP address of the service provider. Fuzzy searches are supported.', example='10.20.x.xx'),
  namespace?: string(name='namespace', description='The ID of the namespace.', example='cn-hangzhou:doc-test'),
  origin?: string(name='origin', description='The source of the data. Valid values:

*   agent: Use this value if you use the service query feature of the latest version to pass the query result.
*   registry: Use this value if you use the service query feature of the earlier version to pass the query result.', example='agent'),
  page?: int32(name='page', description='The number of the page to return.', example='0'),
  region?: string(name='region', description='The ID of the region.', example='cn-hangzhou'),
  registryType?: string(name='registryType', description='The type of the service registry. This parameter is deprecated. You can ignore it.', example='nacos'),
  serviceId?: string(name='serviceId', description='The ID of the service. This parameter is deprecated. You can ignore it.', example='com.alibabacloud.hipstershop.CartService'),
  serviceName?: string(name='serviceName', description='The name of the service.', example='com.alibabacloud.hipstershop.CartService'),
  serviceType?: string(name='serviceType', description='The type of the service.', example='dubbo'),
  serviceVersion?: string(name='serviceVersion', description='The version of the service.', example='1.0.0'),
  size?: int32(name='size', description='The number of entries returned per page.', example='10'),
  source?: string(name='source', description='The source of the service. Set the value to edas.', example='edas'),
}

model GetServiceConsumersPageResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    content?: [ 
      {
        edasAppName?: string(name='EdasAppName', description='The name of the service consumer.', example='k8s-lq-cartservice'),
        edassAppId?: string(name='EdassAppId', description='The ID of the service consumer.', example='efbda488-7b33-432f-a40d-****0047****'),
        ip?: string(name='Ip', description='The IP address of the service consumer.', example='10.20.x.xx'),
      }
    ](name='Content', description='The data array that is returned.'),
    size?: int32(name='Size', description='The number of entries to return on each page.', example='5'),
    totalElements?: int32(name='TotalElements', description='The total number of returned entries.', example='3'),
    totalPages?: int32(name='TotalPages', description='The total number of returned pages.', example='1'),
  }(name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The message that is returned for the request.', example='success'),
  success?: boolean(name='Success', description='Indicates whether the request is successful.', example='true'),
}

model GetServiceConsumersPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceConsumersPageResponseBody(name='body'),
}

/**
 * @summary Queries service consumers.
 *
 * @param request GetServiceConsumersPageRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceConsumersPageResponse
 */
async function getServiceConsumersPageWithOptions(request: GetServiceConsumersPageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetServiceConsumersPageResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['appId'] = request.appId;
  }
  if (!Util.isUnset(request.group)) {
    query['group'] = request.group;
  }
  if (!Util.isUnset(request.ip)) {
    query['ip'] = request.ip;
  }
  if (!Util.isUnset(request.namespace)) {
    query['namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.origin)) {
    query['origin'] = request.origin;
  }
  if (!Util.isUnset(request.page)) {
    query['page'] = request.page;
  }
  if (!Util.isUnset(request.region)) {
    query['region'] = request.region;
  }
  if (!Util.isUnset(request.registryType)) {
    query['registryType'] = request.registryType;
  }
  if (!Util.isUnset(request.serviceId)) {
    query['serviceId'] = request.serviceId;
  }
  if (!Util.isUnset(request.serviceName)) {
    query['serviceName'] = request.serviceName;
  }
  if (!Util.isUnset(request.serviceType)) {
    query['serviceType'] = request.serviceType;
  }
  if (!Util.isUnset(request.serviceVersion)) {
    query['serviceVersion'] = request.serviceVersion;
  }
  if (!Util.isUnset(request.size)) {
    query['size'] = request.size;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceConsumersPage',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/sp/api/mseForOam/getServiceConsumersPage`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries service consumers.
 *
 * @param request GetServiceConsumersPageRequest
 * @return GetServiceConsumersPageResponse
 */
async function getServiceConsumersPage(request: GetServiceConsumersPageRequest): GetServiceConsumersPageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getServiceConsumersPageWithOptions(request, headers, runtime);
}

model GetServiceDetailRequest {
  appId?: string(name='appId', description='The ID of the application.', example='efbda488-7b33-432f-a40d-****0047****'),
  group?: string(name='group', description='The group to which the service belongs.', example='DUBBO'),
  ip?: string(name='ip', description='The IP address of the service provider. Fuzzy searches are supported.', example='10.20.x.xx'),
  namespace?: string(name='namespace', description='The ID of the namespace.', example='cn-hangzhou:doc-test'),
  origin?: string(name='origin', description='The source of the data. Valid values:

*   agent: Use this value if you use the service query feature of the latest version to pass the query result.
*   registry: Use this value if you use the service query feature of the earlier version to pass the query result.', example='agent'),
  region?: string(name='region', description='The region ID of the service.', example='cn-hangzhou'),
  registryType?: string(name='registryType', description='The type of the service registry. This parameter is deprecated. You can ignore it.', example='nacos'),
  serviceId?: string(name='serviceId', description='The ID of the service. This parameter is deprecated. You can ignore it.', example='com.alibabacloud.hipstershop.CartService'),
  serviceName?: string(name='serviceName', description='The name of the service.', example='com.alibabacloud.hipstershop.CartService'),
  serviceType?: string(name='serviceType', description='The type of the service. Valid values:

*   dubbo
*   springCloud
*   hsf
*   istio', example='springCloud'),
  serviceVersion?: string(name='serviceVersion', description='The version of the service.', example='1.0.0'),
  source?: string(name='source', description='The source of the service. Set the value to edas.', example='edas'),
}

model GetServiceDetailResponseBody = {
  code?: int32(name='Code', description='The HTTP status code returned.', example='200'),
  data?: {
    dubboApplicationName?: string(name='DubboApplicationName', description='The name of the Dubbo application.', example='cartservice'),
    edasAppName?: string(name='EdasAppName', description='The name of the Enterprise Distributed Application Service (EDAS) application.', example='test123'),
    group?: string(name='Group', description='The group.', example='dubbo'),
    metadata?: string(name='Metadata', description='The metadata.', example='{}'),
    methods?: [ 
      {
        methodController?: string(name='MethodController', description='The controllers.', example='com.aliware.edas.DemoController'),
        name?: string(name='Name', description='The name of the service.', example='feign2'),
        nameDetail?: string(name='NameDetail', description='The specific name.', example='test'),
        parameterDefinitions?: string(name='ParameterDefinitions', description='The parameter definitions.', example='[{"description":"","name":"arg0","type":"java.lang.String"}]'),
        parameterDetails?: string(name='ParameterDetails', description='The parameter details.', example='{}'),
        parameterNames?: string(name='ParameterNames', description='The parameter names.', example='test'),
        parameterTypes?: string(name='ParameterTypes', description='The parameter types.', example='["java.lang.String"]'),
        paths?: string(name='Paths', description='The method paths.', example='["/consumer-echo/feign/{str}"]'),
        requestMethods?: string(name='RequestMethods', description='The request methods.', example='GET'),
        returnDefinition?: {
          id?: string(name='Id', description='The ID of the return value.', example='1'),
          type?: string(name='Type', description='The type of the response.', example='foo'),
        }(name='ReturnDefinition', description='The definition of the value returned by the method.'),
        returnDetails?: string(name='ReturnDetails', description='The response details.', example='test'),
        returnType?: string(name='ReturnType', description='The type of the response.', example='java.lang.String'),
      }
    ](name='Methods', description='The methods.'),
    registryType?: string(name='RegistryType', description='The type of the service registry.', example='agent'),
    serviceName?: string(name='ServiceName', description='The name of the service.', example='edas.service.consumer'),
    serviceType?: string(name='ServiceType', description='The type of the service.', example='springCloud'),
    springApplicationName?: string(name='SpringApplicationName', description='The name of the Spring application.', example='edas.service.consumer'),
    version?: string(name='Version', description='The version number.', example='1.0.0'),
  }(name='Data', description='The data structure.'),
  message?: string(name='Message', description='The message returned for the request.', example='success'),
  success?: boolean(name='Success', description='Indicates whether the call was successful.', example='true'),
}

model GetServiceDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceDetailResponseBody(name='body'),
}

/**
 * @summary Queries service details.
 *
 * @param request GetServiceDetailRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceDetailResponse
 */
async function getServiceDetailWithOptions(request: GetServiceDetailRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetServiceDetailResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['appId'] = request.appId;
  }
  if (!Util.isUnset(request.group)) {
    query['group'] = request.group;
  }
  if (!Util.isUnset(request.ip)) {
    query['ip'] = request.ip;
  }
  if (!Util.isUnset(request.namespace)) {
    query['namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.origin)) {
    query['origin'] = request.origin;
  }
  if (!Util.isUnset(request.region)) {
    query['region'] = request.region;
  }
  if (!Util.isUnset(request.registryType)) {
    query['registryType'] = request.registryType;
  }
  if (!Util.isUnset(request.serviceId)) {
    query['serviceId'] = request.serviceId;
  }
  if (!Util.isUnset(request.serviceName)) {
    query['serviceName'] = request.serviceName;
  }
  if (!Util.isUnset(request.serviceType)) {
    query['serviceType'] = request.serviceType;
  }
  if (!Util.isUnset(request.serviceVersion)) {
    query['serviceVersion'] = request.serviceVersion;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceDetail',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/sp/api/mseForOam/getServiceDetail`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries service details.
 *
 * @param request GetServiceDetailRequest
 * @return GetServiceDetailResponse
 */
async function getServiceDetail(request: GetServiceDetailRequest): GetServiceDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getServiceDetailWithOptions(request, headers, runtime);
}

model GetServiceListPageRequest {
  namespace?: string(name='namespace', description='The namespace.', example='cn-hangzhou:doc-test'),
  origin?: string(name='origin', description='The source of the data. Valid values:

*   `agent`: Use this value if you use the service query feature of the latest version to pass the query result.
*   `registry`: Use this value if you use the service query feature of the earlier version to pass the query result.', example='Agent'),
  page?: int32(name='page', description='The number of the page to return. Pages start from Page 0.', example='0'),
  region?: string(name='region', description='The ID of the region.', example='cn-hangzhou'),
  searchType?: string(name='searchType', description='The type of the service. Valid values:

*   `app`: searches by application.
*   `service`: searches by service.
*   `providerIp`: searches by IP address.', example='App'),
  searchValue?: string(name='searchValue', description='The keyword used for the search.

*   Set this parameter to the ID of the application if you set the searchType parameter to app.``
*   Set this parameter to the name of the service if you set the serachType parameter to service.``
*   Set this parameter to the IP address of the application if you set the searchType parameter to providerIp.', example='com.alibaba.edas.HelloService'),
  serviceType?: string(name='serviceType', description='The type of the service. Valid values:

*   `dubbo`
*   `springCloud`
*   `hsf`
*   `istio`', example='SpringCloud'),
  side?: string(name='side', description='Specifies the provider side or the consumer side. Valid values:

*   provider
*   consumer', example='provider'),
  size?: int32(name='size', description='The number of entries to return on each page.', example='10'),
}

model GetServiceListPageResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    content?: [ 
      {
        edasAppId?: string(name='EdasAppId', description='The ID of the application.', example='efbda488-7b33-432f-****-36530047****'),
        edasAppName?: string(name='EdasAppName', description='The name of the application.', example='k8s-lq-cartservice'),
        group?: string(name='Group', description='The service group.', example='DUBBO'),
        instanceNum?: int32(name='InstanceNum', description='The number of instances.', example='1'),
        registerType?: string(name='RegisterType', description='The type of the service registry.', example='xx'),
        serviceId?: string(name='ServiceId', description='The ID of the service.', example='xx'),
        serviceName?: string(name='ServiceName', description='The name of the service.', example='com.alibabacloud.hipstershop.CartService'),
        version?: string(name='Version', description='The version number.', example='1.0.0'),
      }
    ](name='Content', description='The data array that is returned.'),
    size?: int32(name='Size', description='The number of entries returned per page.', example='8'),
    totalElements?: int32(name='TotalElements', description='The total number of returned entries.', example='6'),
    totalPages?: int32(name='TotalPages', description='The total number of returned pages.', example='1'),
  }(name='Data', description='The returned data.'),
  message?: string(name='Message', description='The message that is returned for the request.', example='success'),
  success?: boolean(name='Success', description='Indicates whether the request is successful.', example='true'),
}

model GetServiceListPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceListPageResponseBody(name='body'),
}

/**
 * @summary Queries services.
 *
 * @param request GetServiceListPageRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceListPageResponse
 */
async function getServiceListPageWithOptions(request: GetServiceListPageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetServiceListPageResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.namespace)) {
    query['namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.origin)) {
    query['origin'] = request.origin;
  }
  if (!Util.isUnset(request.page)) {
    query['page'] = request.page;
  }
  if (!Util.isUnset(request.region)) {
    query['region'] = request.region;
  }
  if (!Util.isUnset(request.searchType)) {
    query['searchType'] = request.searchType;
  }
  if (!Util.isUnset(request.searchValue)) {
    query['searchValue'] = request.searchValue;
  }
  if (!Util.isUnset(request.serviceType)) {
    query['serviceType'] = request.serviceType;
  }
  if (!Util.isUnset(request.side)) {
    query['side'] = request.side;
  }
  if (!Util.isUnset(request.size)) {
    query['size'] = request.size;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceListPage',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/sp/api/mseForOam/getServiceListPage`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries services.
 *
 * @param request GetServiceListPageRequest
 * @return GetServiceListPageResponse
 */
async function getServiceListPage(request: GetServiceListPageRequest): GetServiceListPageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getServiceListPageWithOptions(request, headers, runtime);
}

model GetServiceMethodPageRequest {
  appId?: string(name='appId', description='The ID of the application.', example='310b18c3-1dbe-4807-****-18d7d637****'),
  group?: string(name='group', description='The group to which the service belongs.', example='DUBBO'),
  ip?: string(name='ip', description='The IP address of the service.', example='127.0.0.1'),
  methodController?: string(name='methodController', description='The controller method.', example='com.aliware.edas.DemoController'),
  name?: string(name='name', description='The name of the method.', example='echo'),
  namespace?: string(name='namespace', description='The ID of the namespace.', example='cn-hangzhou:doc-test'),
  origin?: string(name='origin', description='The source of the data. Valid values:

*   agent: Use this value if you use the service query feature of the latest version to pass the query result.
*   registry: Use this value if you use the service query feature of the earlier version to pass the query result.', example='agent'),
  pageNumber?: int32(name='pageNumber', description='The number of the page to return.', example='1'),
  pageSize?: int32(name='pageSize', description='The number of entries to return on each page.', example='10'),
  path?: string(name='path', description='The request path.', example='/echo/{str}'),
  region?: string(name='region', description='The ID of the region.', example='cn-hangzhou'),
  registryType?: string(name='registryType', description='The type of the service registry.', example='nacos'),
  serviceId?: string(name='serviceId', description='The ID of the service.', example='edas.service.consumer'),
  serviceName?: string(name='serviceName', description='The name of the service.', example='edas.service.consumer'),
  serviceType?: string(name='serviceType', description='The type of the service. Valid values:

*   dubbo: Dubbo service
*   springCloud: Spring Cloud service
*   hsf: High-speed Service Framework (HSF) service', example='springCloud'),
  serviceVersion?: string(name='serviceVersion', description='The version of the service.', example='1.0.0'),
  source?: string(name='source', description='The source of the service. Set the value to edas.', example='edas'),
}

model GetServiceMethodPageResponseBody = {
  code?: string(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
    result?: [ 
      {
        methodController?: string(name='MethodController', description='The method.', example='com.aliware.edas.EchoController'),
        name?: string(name='Name', description='The name of the method.', example='echo'),
        nameDetail?: string(name='NameDetail', description='The details of the method.', example='name'),
        parameterDefinitions?: string(name='ParameterDefinitions', description='The definition of the parameter.', example='[{"description":"","name":"arg0","type":"java.lang.String"}]'),
        parameterDetails?: string(name='ParameterDetails', description='The details of the parameters.', example='{}'),
        parameterNames?: string(name='ParameterNames', description='The name of the parameter.', example='echo'),
        parameterTypes?: string(name='ParameterTypes', description='The data type of the parameter.', example='java.lang.String'),
        paths?: string(name='Paths', description='The method path.', example='/consumer/alive'),
        requestMethods?: string(name='RequestMethods', description='The request method.', example='GET'),
        returnDefinition?: {
          id?: string(name='Id', description='The ID of the return value.', example='1'),
          type?: string(name='Type', description='The data format of the response.', example='java.lang.String'),
        }(name='ReturnDefinition', description='The return value.'),
        returnDetails?: string(name='ReturnDetails', description='The details of the response.', example='java.lang.String'),
        returnType?: string(name='ReturnType', description='The data format of the response.', example='java.lang.String'),
      }
    ](name='Result', description='The data about the method.'),
    totalSize?: int32(name='TotalSize', description='The total number of entries.', example='6'),
  }(name='Data', description='The data that is returned.'),
  httpCode?: string(name='HttpCode', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='BDC0C0FE-D63B-4FC8-****-4081C57E****'),
  success?: boolean(name='Success', description='Indicates whether the request is successful.', example='true'),
}

model GetServiceMethodPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceMethodPageResponseBody(name='body'),
}

/**
 * @summary Queries service methods.
 *
 * @param request GetServiceMethodPageRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceMethodPageResponse
 */
async function getServiceMethodPageWithOptions(request: GetServiceMethodPageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetServiceMethodPageResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['appId'] = request.appId;
  }
  if (!Util.isUnset(request.group)) {
    query['group'] = request.group;
  }
  if (!Util.isUnset(request.ip)) {
    query['ip'] = request.ip;
  }
  if (!Util.isUnset(request.methodController)) {
    query['methodController'] = request.methodController;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    query['namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.origin)) {
    query['origin'] = request.origin;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['pageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.path)) {
    query['path'] = request.path;
  }
  if (!Util.isUnset(request.region)) {
    query['region'] = request.region;
  }
  if (!Util.isUnset(request.registryType)) {
    query['registryType'] = request.registryType;
  }
  if (!Util.isUnset(request.serviceId)) {
    query['serviceId'] = request.serviceId;
  }
  if (!Util.isUnset(request.serviceName)) {
    query['serviceName'] = request.serviceName;
  }
  if (!Util.isUnset(request.serviceType)) {
    query['serviceType'] = request.serviceType;
  }
  if (!Util.isUnset(request.serviceVersion)) {
    query['serviceVersion'] = request.serviceVersion;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceMethodPage',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/sp/api/mseForOam/getServiceMethodPage`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries service methods.
 *
 * @param request GetServiceMethodPageRequest
 * @return GetServiceMethodPageResponse
 */
async function getServiceMethodPage(request: GetServiceMethodPageRequest): GetServiceMethodPageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getServiceMethodPageWithOptions(request, headers, runtime);
}

model GetServiceProvidersPageRequest {
  appId?: string(name='appId', description='The ID of the application.', example='efbda488-7b33-432f-a40d-****0047****'),
  group?: string(name='group', description='The group to which the service belongs.', example='DUBBO'),
  ip?: string(name='ip', description='The IP address of the service provider. Fuzzy searches are supported.', example='10.20.x.xx'),
  namespace?: string(name='namespace', description='The ID of the namespace.', example='cn-hangzhou:doc-test'),
  origin?: string(name='origin', description='The source of data. Valid values:

*   agent: Use this value if you use the service query feature of the latest version to pass the query result.
*   registry: Use this value if you use the service query feature of the earlier version to pass the query result.', example='agent'),
  page?: int32(name='page', description='The number of the page to return. Pages start from Page 0.', example='0'),
  region?: string(name='region', description='The ID of the region.', example='cn-hangzhou'),
  registryType?: string(name='registryType', description='The type of the service registry. This parameter is deprecated. You can ignore it.', example='nacos'),
  serviceId?: string(name='serviceId', description='The ID of the service. This parameter is deprecated. You can ignore it.', example='com.alibabacloud.hipstershop.CartService'),
  serviceName?: string(name='serviceName', description='The name of the service.', example='com.alibabacloud.hipstershop.CartService'),
  serviceType?: string(name='serviceType', description='The type of the service. Valid values:

*   dubbo: Dubbo service
*   springCloud: Spring Cloud service
*   hsf: High-speed Service Framework (HSF) service', example='dubbo'),
  serviceVersion?: string(name='serviceVersion', description='The version of the service.', example='1.0.0'),
  size?: int32(name='size', description='The number of entries to return on each page.', example='10'),
  source?: string(name='source', description='The source of the service. Set the value to edas.', example='edas'),
}

model GetServiceProvidersPageResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    content?: [ 
      {
        iannotations?: string(name='Iannotations', description='The remarks of the service provider.', example='172.178.XX.XX'),
        ip?: string(name='Ip', description='The IP address of the service provider.', example='10.20.XX.XX'),
        port?: string(name='Port', description='The port number of the service provider.', example='12345'),
        serializeType?: string(name='SerializeType', description='The serialization type.', example='hessian2'),
        timeout?: string(name='Timeout', description='The service timeout period.', example='1000'),
      }
    ](name='Content', description='The data array returned.'),
    size?: int32(name='Size', description='The number of entries returned per page.', example='5'),
    totalElements?: int32(name='TotalElements', description='The total number of returned entries.', example='1'),
    totalPages?: int32(name='TotalPages', description='The total number of returned pages.', example='1'),
  }(name='Data', description='The data structure.'),
  message?: string(name='Message', description='The message returned for the request.', example='success'),
  success?: boolean(name='Success', description='Indicates whether the request is successful.', example='true'),
}

model GetServiceProvidersPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceProvidersPageResponseBody(name='body'),
}

/**
 * @summary Queries service providers.
 *
 * @param request GetServiceProvidersPageRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceProvidersPageResponse
 */
async function getServiceProvidersPageWithOptions(request: GetServiceProvidersPageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetServiceProvidersPageResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['appId'] = request.appId;
  }
  if (!Util.isUnset(request.group)) {
    query['group'] = request.group;
  }
  if (!Util.isUnset(request.ip)) {
    query['ip'] = request.ip;
  }
  if (!Util.isUnset(request.namespace)) {
    query['namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.origin)) {
    query['origin'] = request.origin;
  }
  if (!Util.isUnset(request.page)) {
    query['page'] = request.page;
  }
  if (!Util.isUnset(request.region)) {
    query['region'] = request.region;
  }
  if (!Util.isUnset(request.registryType)) {
    query['registryType'] = request.registryType;
  }
  if (!Util.isUnset(request.serviceId)) {
    query['serviceId'] = request.serviceId;
  }
  if (!Util.isUnset(request.serviceName)) {
    query['serviceName'] = request.serviceName;
  }
  if (!Util.isUnset(request.serviceType)) {
    query['serviceType'] = request.serviceType;
  }
  if (!Util.isUnset(request.serviceVersion)) {
    query['serviceVersion'] = request.serviceVersion;
  }
  if (!Util.isUnset(request.size)) {
    query['size'] = request.size;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceProvidersPage',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/sp/api/mseForOam/getServiceProvidersPage`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries service providers.
 *
 * @param request GetServiceProvidersPageRequest
 * @return GetServiceProvidersPageResponse
 */
async function getServiceProvidersPage(request: GetServiceProvidersPageRequest): GetServiceProvidersPageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getServiceProvidersPageWithOptions(request, headers, runtime);
}

model GetWebContainerConfigRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='5a166fbd-****-****'),
}

model GetWebContainerConfigResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-eiufh'),
  webContainerConfig?: {
    contextInputType?: string(name='ContextInputType', description='The type of the context path.', example='root'),
    contextPath?: string(name='ContextPath', description='The context path.', example='ROOT'),
    httpPort?: int32(name='HttpPort', description='The HTTP service port.', example='8080'),
    maxThreads?: int32(name='MaxThreads', description='The maximum number of threads.', example='500'),
    serverXml?: string(name='ServerXml', description='The content of the server.xml file customized by using advanced configurations.', example='<Server port=*****'),
    uriEncoding?: string(name='UriEncoding', description='The URI encoding scheme.', example='ISO-8859-1'),
    useAdvancedServerXml?: boolean(name='UseAdvancedServerXml', description='Indicates whether advanced configurations are used to customize the server.xml file.', example='true'),
    useBodyEncoding?: boolean(name='UseBodyEncoding', description='Indicates whether the encoding scheme specified in the request body is used for uniform resource identifier (URI) query parameters.', example='true'),
    useDefaultConfig?: boolean(name='UseDefaultConfig', description='Indicates whether the default configurations are used.', example='true'),
  }(name='WebContainerConfig', description='The Tomcat configurations of the application.'),
}

model GetWebContainerConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWebContainerConfigResponseBody(name='body'),
}

/**
 * @summary Queries the Tomcat configurations of an application.
 *
 * @description ***
 *
 * @param request GetWebContainerConfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWebContainerConfigResponse
 */
async function getWebContainerConfigWithOptions(request: GetWebContainerConfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetWebContainerConfigResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetWebContainerConfig',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/oam/web_container_config`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the Tomcat configurations of an application.
 *
 * @description ***
 *
 * @param request GetWebContainerConfigRequest
 * @return GetWebContainerConfigResponse
 */
async function getWebContainerConfig(request: GetWebContainerConfigRequest): GetWebContainerConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getWebContainerConfigWithOptions(request, headers, runtime);
}

model ImportK8sClusterRequest {
  clusterId?: string(name='ClusterId', description='The ID of the ACK cluster or serverless Kubernetes cluster. You can obtain the cluster ID by calling the GetK8sCluster operation. For more information, see [GetK8sCluster](https://help.aliyun.com/document_detail/181437.html).

This parameter is required.', example='9c28bbb9-****-44b3-b953-54ef8a2d0be2'),
  enableAsm?: boolean(name='EnableAsm', description='Specifies whether to enable the integration with Alibaba Cloud Service Mesh (ASM). Valid values:

*   true: Enables the integration with ASM.
*   false: Disables the integration with ASM.', example='true'),
  mode?: int32(name='Mode', description='You can ignore this parameter.', example='1'),
  namespaceId?: string(name='NamespaceId', description='The ID of the namespace. It is in the format of `Region ID:Identifier of the microservices namespace`. Example: `cn-hangzhou:doc`.', example='cn-beijing:doc'),
}

model ImportK8sClusterResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='The ID of the cluster in EDAS.', example='cf96d49a-6be2-4b6d-****-75c7fb86****'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
}

model ImportK8sClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportK8sClusterResponseBody(name='body'),
}

/**
 * @summary Imports a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster to Enterprise Distributed Application Service (EDAS).
 *
 * @param request ImportK8sClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportK8sClusterResponse
 */
async function importK8sClusterWithOptions(request: ImportK8sClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ImportK8sClusterResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.enableAsm)) {
    query['EnableAsm'] = request.enableAsm;
  }
  if (!Util.isUnset(request.mode)) {
    query['Mode'] = request.mode;
  }
  if (!Util.isUnset(request.namespaceId)) {
    query['NamespaceId'] = request.namespaceId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ImportK8sCluster',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/import_k8s_cluster`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Imports a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster to Enterprise Distributed Application Service (EDAS).
 *
 * @param request ImportK8sClusterRequest
 * @return ImportK8sClusterResponse
 */
async function importK8sCluster(request: ImportK8sClusterRequest): ImportK8sClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return importK8sClusterWithOptions(request, headers, runtime);
}

model InsertApplicationRequest {
  applicationName?: string(name='ApplicationName', description='The name of the application. The name can contain only digits, letters, hyphens (-), and underscores (_) and must start with a letter. The name can be up to 36 characters in length.

This parameter is required.', example='hello-edas-test-1'),
  buildPackId?: int32(name='BuildPackId', description='The build package number of EDAS Container. This parameter is required if you create a High-Speed Service Framework (HSF) application. You can query the build package number by using one of the following methods:

*   Call the ListBuildPack operation. For more information, see [ListBuildPack](https://help.aliyun.com/document_detail/149391.html).
*   Obtain the value in the **Build package number** column of the [Release notes for EDAS Container](https://help.aliyun.com/document_detail/92614.html) topic.', example='59'),
  clusterId?: string(name='ClusterId', description='The ID of the ECS cluster in which you want to create the application. If you specify an ID, the application is created in the specified ECS cluster. If you leave this parameter empty, the application is created in the default cluster. We recommend that you specify this parameter.', example='13136119-f384-4f50-b76e-xxxxxxxxxxx'),
  componentIds?: string(name='ComponentIds', description='The ID of the application component. You can call the ListComponents operation to query the component IDs. For more information, see [ListComponents](https://help.aliyun.com/document_detail/97502.html).

This parameter is required if the application runs in Apache Tomcat or in a standard Java application runtime environment. The Apache Tomcat application runtime environment is applicable to Dubbo applications that are deployed by using WAR packages. A standard Java application runtime environment is applicable to Spring Boot or Spring Cloud applications that are deployed by using JAR packages.

Valid values for common application components:

*   4: Apache Tomcat 7.0.91
*   7: Apache Tomcat 8.5.42
*   5: OpenJDK 1.8.x
*   6: OpenJDK 1.7.x

This parameter is available only for Java SDK 2.57.3 or later, or Python SDK 2.57.3 or later. Assume that you use an SDK that is not provided by EDAS, for example, aliyun-python-sdk-core, aliyun-java-sdk-core, and Alibaba Cloud CLI. In this case, you can directly specify this parameter.', example='7'),
  cpu?: int32(name='Cpu', description='The number of CPU cores that can be used by the application container in a Swarm cluster. \\\\*\\\\*This parameter is deprecated.\\\\*\\\\*', example='2'),
  description?: string(name='Description', description='The description of the application.', example='create by edas pop api'),
  ecuInfo?: string(name='EcuInfo', description='The value of `ecu_id` of the ECS instance to be added during scale-out. The ECU ID is the unique identity for an ECS instance that is imported to EDAS. Separate multiple values of `ecu_id` with commas (,). You can call the ListScaleOutEcu operation to query the value of `ecu_id`. For more information, see [ListScaleOutEcu](https://help.aliyun.com/document_detail/149371.html).', example='07bd417a-b863-477d-****-************'),
  enablePortCheck?: boolean(name='EnablePortCheck', description='Specifies whether to enable the port health check. Valid values:

*   **true**: enable the port health check.
*   **false**: does not enable the port health check.', example='true'),
  enableUrlCheck?: boolean(name='EnableUrlCheck', description='Specifies whether to enable the URL health check. Valid values:

*   **true**: enables the URL health check.
*   **false**: does not enable the URL health check.', example='true'),
  healthCheckURL?: string(name='HealthCheckURL', description='The health check URL of the application.', example='http://127.0.0.1:8080/_ehc.html'),
  healthCheckUrl?: string(name='HealthCheckUrl', description='The health check URL of the application. This parameter is equivalent to the HealthCheckURL parameter.', example='http://127.0.0.1:8080/_ehc.html'),
  hooks?: string(name='Hooks', description='The script to mount. Set the value in the JSON format. Example: `[{"ignoreFail":false,"name":"postprepareInstanceEnvironmentOnScaleOut","script":"ls"},{"ignoreFail":true,"name":"postdeleteInstanceDataOnScaleIn","script":""},{"ignoreFail":true,"name":"prestartInstance","script":""},{"ignoreFail":true,"name":"poststartInstance","script":""},{"ignoreFail":true,"name":"prestopInstance","script":""},{"ignoreFail":true,"name":"poststopInstance","script":""}]`', example='[{"ignoreFail":false,"name":"postprepareInstanceEnvironmentOnScaleOut","script":"ls"}]'),
  jdk?: string(name='Jdk', description='The version of the Java Development Kit (JDK) used to deploy the application. **This parameter is deprecated.', example='8'),
  jvmOptions?: string(name='JvmOptions', description='The custom parameters.', example='-Dproperty=value'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the microservices namespace. To query the ID of a microservices namespace, you can choose **Resource Management** > **Microservice Namespaces** in the left-side navigation pane of the EDAS console or call the ListUserDefineRegion operation. For more information, see [ListUserDefineRegion](https://help.aliyun.com/document_detail/149377.html).

*   This parameter is required if the cluster you specify is not deployed in the default microservices namespace. Otherwise, the message `application regionId is different with cluster regionId!` appears.
*   If the cluster you specify is deployed in the default microservices namespace, you do not need to specify this parameter. Set this parameter to the ID of the microservices namespace in which the cluster you specify is deployed.', example='cn-beijing:prod'),
  maxHeapSize?: int32(name='MaxHeapSize', description='The maximum size of the heap memory. Unit: MB.', example='1000'),
  maxPermSize?: int32(name='MaxPermSize', description='The size of the permanent generation heap memory. Unit: MB.', example='200'),
  mem?: int32(name='Mem', description='The memory size that can be used by the application container in a Swarm cluster. \\\\*\\\\*This parameter is deprecated.\\\\*\\\\*', example='2048'),
  minHeapSize?: int32(name='MinHeapSize', description='The initial size of the heap memory. Unit: MB.', example='500'),
  packageType?: string(name='PackageType', description='The type of the application deployment package. Valid values: war and jar.', example='war'),
  reservedPortStr?: string(name='ReservedPortStr', description='The reserved port for the application. \\\\*\\\\*This parameter is deprecated.\\\\*\\\\*', example='8090'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aek24j4s4b*****'),
  webContainer?: string(name='WebContainer', description='The version of Apache Tomcat. **This parameter is deprecated.', example='4'),
}

model InsertApplicationResponseBody = {
  applicationInfo?: {
    appId?: string(name='AppId', description='The ID of the application. The ID is the unique identifier of the application in EDAS.', example='6c733bcd-6efb-47a1-8226-cf722c******'),
    appName?: string(name='AppName', description='The name of the application.', example='hello-edas-test-1'),
    changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='d0cf569e-dce3-4efb-****-08b70021****'),
    dockerize?: boolean(name='Dockerize', description='Indicates whether the application is a Docker application. Valid values:

*   **true**: The application is a Docker application.
*   **false**: The application is not a Docker application.', example='false'),
    owner?: string(name='Owner', description='The owner of the application. The owner is the user who created the application.', example='249763358688********'),
    port?: int32(name='Port', description='The port used by the created application. Default value: 8080. You can call the UpdateContainerConfiguration operation to change the port. For more information, see [UpdateContainerConfiguration](https://help.aliyun.com/document_detail/149403.html).', example='8080'),
    regionName?: string(name='RegionName', description='The name of the region.', example='cn-hangzhou'),
    userId?: string(name='UserId', description='The ID of the user who created the application.', example='tdy218@1362469756xxxxxx'),
  }(name='ApplicationInfo', description='The information about the created application.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='The application name test-hsy-C5039-paas-6 had been created successfully.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4264F69C-686C-4107-B493-0599C8xxxxxx'),
}

model InsertApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertApplicationResponseBody(name='body'),
}

/**
 * @summary Creates an application in an Elastic Compute Service (ECS) cluster.
 *
 * @description > To create an application in a Kubernetes cluster, call the InsertK8sApplication operation provided by Enterprise Distributed Application Service (EDAS).
 *
 * @param request InsertApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertApplicationResponse
 */
async function insertApplicationWithOptions(request: InsertApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.applicationName)) {
    query['ApplicationName'] = request.applicationName;
  }
  if (!Util.isUnset(request.buildPackId)) {
    query['BuildPackId'] = request.buildPackId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.componentIds)) {
    query['ComponentIds'] = request.componentIds;
  }
  if (!Util.isUnset(request.cpu)) {
    query['Cpu'] = request.cpu;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.ecuInfo)) {
    query['EcuInfo'] = request.ecuInfo;
  }
  if (!Util.isUnset(request.enablePortCheck)) {
    query['EnablePortCheck'] = request.enablePortCheck;
  }
  if (!Util.isUnset(request.enableUrlCheck)) {
    query['EnableUrlCheck'] = request.enableUrlCheck;
  }
  if (!Util.isUnset(request.healthCheckURL)) {
    query['HealthCheckURL'] = request.healthCheckURL;
  }
  if (!Util.isUnset(request.healthCheckUrl)) {
    query['HealthCheckUrl'] = request.healthCheckUrl;
  }
  if (!Util.isUnset(request.hooks)) {
    query['Hooks'] = request.hooks;
  }
  if (!Util.isUnset(request.jdk)) {
    query['Jdk'] = request.jdk;
  }
  if (!Util.isUnset(request.jvmOptions)) {
    query['JvmOptions'] = request.jvmOptions;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }
  if (!Util.isUnset(request.maxHeapSize)) {
    query['MaxHeapSize'] = request.maxHeapSize;
  }
  if (!Util.isUnset(request.maxPermSize)) {
    query['MaxPermSize'] = request.maxPermSize;
  }
  if (!Util.isUnset(request.mem)) {
    query['Mem'] = request.mem;
  }
  if (!Util.isUnset(request.minHeapSize)) {
    query['MinHeapSize'] = request.minHeapSize;
  }
  if (!Util.isUnset(request.packageType)) {
    query['PackageType'] = request.packageType;
  }
  if (!Util.isUnset(request.reservedPortStr)) {
    query['ReservedPortStr'] = request.reservedPortStr;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.webContainer)) {
    query['WebContainer'] = request.webContainer;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_create_app`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an application in an Elastic Compute Service (ECS) cluster.
 *
 * @description > To create an application in a Kubernetes cluster, call the InsertK8sApplication operation provided by Enterprise Distributed Application Service (EDAS).
 *
 * @param request InsertApplicationRequest
 * @return InsertApplicationResponse
 */
async function insertApplication(request: InsertApplicationRequest): InsertApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertApplicationWithOptions(request, headers, runtime);
}

model InsertClusterRequest {
  clusterName?: string(name='ClusterName', description='The name of the cluster.

This parameter is required.', example='****_product_test2'),
  clusterType?: int32(name='ClusterType', description='The type of the cluster. Valid values:

*   2: Elastic Compute Service (ECS) cluster
*   3: self-managed Kubernetes cluster in Enterprise Distributed Application Service (EDAS)
*   5: Kubernetes cluster

This parameter is required.', example='2'),
  iaasProvider?: string(name='IaasProvider', description='The provider of Infrastructure as a Service (IaaS) resources that are used in the cluster.

When you use Alibaba Cloud, set the value to `ALIYUN`. The value is case-sensitive.', example='ALIYUN'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the custom namespace. The ID is in the `physical region ID:custom namespace identifier` format. Example: `cn-hangzhou:test`.', example='cn-beijing:td****'),
  networkMode?: int32(name='NetworkMode', description='The network type of the cluster. Valid values:

*   1: classic network
*   2: virtual private cloud (VPC)

This parameter is required.', example='2'),
  oversoldFactor?: int32(name='OversoldFactor', description='**This parameter is deprecated.** The CPU overcommit ratio supported by a Docker cluster. Valid values:

*   2: 1:2, which means that resources are overcommitted by 1:2.
*   4: 1:4, which means that resources are overcommitted by 1:4.
*   8: 1:8, which means that resources are overcommitted by 1:8.', example='2'),
  vpcId?: string(name='VpcId', description='The ID of the VPC. This parameter is required if you set the NetworkMode parameter to 2.', example='vpc-2zef6ob8mrlzv8x3q****'),
}

model InsertClusterResponseBody = {
  cluster?: {
    clusterId?: string(name='ClusterId', description='The ID of cluster.', example='8705ad13-5d86-47fc-b68f-257b59ed****'),
    clusterName?: string(name='ClusterName', description='The name of the cluster.', example='****_product_test2'),
    clusterType?: int32(name='ClusterType', description='The type of the cluster. Valid values:

*   2: ECS cluster
*   3: self-managed Kubernetes cluster in EDAS
*   5: Kubernetes cluster', example='2'),
    iaasProvider?: string(name='IaasProvider', description='The provider of the IaaS resources that are used in the cluster.', example='ALIYUN'),
    networkMode?: int32(name='NetworkMode', description='The network type of the cluster. Valid values:

*   1: classic network
*   2\\\\. VPC', example='2'),
    oversoldFactor?: int32(name='OversoldFactor', description='**This parameter is deprecated.** The CPU overcommit ratio supported by the Docker cluster. Valid values:

*   2: 1:2, which means that resources are overcommitted by 1:2.
*   4: 1:4, which means that resources are overcommitted by 1:4.
*   8: 1:8, which means that resources are overcommitted by 1:8.', example='1'),
    regionId?: string(name='RegionId', description='The ID of the region in which the cluster resides.', example='cn-beijing'),
    vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-2zef6ob8mrlzv8x3q****'),
  }(name='Cluster', description='The information about the cluster that was created.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
}

model InsertClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertClusterResponseBody(name='body'),
}

/**
 * @summary Creates a cluster.
 *
 * @param request InsertClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertClusterResponse
 */
async function insertClusterWithOptions(request: InsertClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertClusterResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['ClusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.iaasProvider)) {
    query['IaasProvider'] = request.iaasProvider;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }
  if (!Util.isUnset(request.networkMode)) {
    query['NetworkMode'] = request.networkMode;
  }
  if (!Util.isUnset(request.oversoldFactor)) {
    query['OversoldFactor'] = request.oversoldFactor;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertCluster',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/cluster`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a cluster.
 *
 * @param request InsertClusterRequest
 * @return InsertClusterResponse
 */
async function insertCluster(request: InsertClusterRequest): InsertClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertClusterWithOptions(request, headers, runtime);
}

model InsertClusterMemberRequest {
  clusterId?: string(name='clusterId', description='The ID of the cluster into which you want to import ECS instances.

This parameter is required.', example='b3e3f77b-462e-****-****-bec8727a4dc8'),
  instanceIds?: string(name='instanceIds', description='The ID of the ECS instance that you want to import into the cluster. Separate multiple IDs with commas (,).

This parameter is required.', example='i-2ze7s2v0b789k60p****'),
  password?: string(name='password', description='The logon password of the ECS instance that you want to import into the cluster.

This parameter is required.', example='YourPassword'),
}

model InsertClusterMemberResponseBody = {
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  data?: string(name='Data', description='The data returned for the request.', example='Transform submit success!'),
  message?: string(name='Message', description='The additional information returned.', example='success'),
  requestId?: string(name='RequestId', description='The request ID.', example='01B49A88-B06F-423B-A5EF-E5C0A89******'),
}

model InsertClusterMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertClusterMemberResponseBody(name='body'),
}

/**
 * @summary Imports Elastic Compute Service (ECS) instances into an ECS cluster.
 *
 * @description ##
 * If you call this operation to import an ECS instance, the operating system of the ECS instance is reinstalled. After the operating system is reinstalled, all original data of the ECS instance is deleted. In addition, you must set a logon password for the ECS instance. Make sure that no important data exists on the ECS instance that you want to import or data has been backed up for the ECS instance.
 * > We recommend that you call the InstallAgent operation instead of this operation. For more information, see [InstallAgent](https://help.aliyun.com/document_detail/127023.html).
 *
 * @param request InsertClusterMemberRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertClusterMemberResponse
 */
async function insertClusterMemberWithOptions(request: InsertClusterMemberRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertClusterMemberResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['clusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.instanceIds)) {
    query['instanceIds'] = request.instanceIds;
  }
  if (!Util.isUnset(request.password)) {
    query['password'] = request.password;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertClusterMember',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/cluster_member`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Imports Elastic Compute Service (ECS) instances into an ECS cluster.
 *
 * @description ##
 * If you call this operation to import an ECS instance, the operating system of the ECS instance is reinstalled. After the operating system is reinstalled, all original data of the ECS instance is deleted. In addition, you must set a logon password for the ECS instance. Make sure that no important data exists on the ECS instance that you want to import or data has been backed up for the ECS instance.
 * > We recommend that you call the InstallAgent operation instead of this operation. For more information, see [InstallAgent](https://help.aliyun.com/document_detail/127023.html).
 *
 * @param request InsertClusterMemberRequest
 * @return InsertClusterMemberResponse
 */
async function insertClusterMember(request: InsertClusterMemberRequest): InsertClusterMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertClusterMemberWithOptions(request, headers, runtime);
}

model InsertDeployGroupRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='3616cdca-4f92-4413-***********'),
  groupName?: string(name='GroupName', description='The name of the instance group. The name can be up to 64 characters in length.

This parameter is required.', example='test'),
  initPackageVersionId?: string(name='InitPackageVersionId', description='The version of the initial deployment package associated with the instance group. You can call the ListHistoryDeployVersion operation to query the version. For more information, see [ListHistoryDeployVersion](https://help.aliyun.com/document_detail/149392.html).', example='441beb18-da42-44dc-****-****'),
}

model InsertDeployGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  deployGroupEntity?: {
    appId?: string(name='AppId', description='The ID of the application.', example='3616cdca-4f92-4413-***********'),
    appVersionId?: string(name='AppVersionId', description='The version of the deployment package for the application.

*   If the application is deployed, a string of random numbers is returned.
*   If the application is not deployed, the return value is empty.', example='****f4c50-16ee-a02b-667*****'),
    clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='0d247b93-8d62-4e34***********'),
    createTime?: long(name='CreateTime', description='The time when the instance group was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573627695779'),
    groupName?: string(name='GroupName', description='The name of the instance group.', example='test'),
    groupType?: int32(name='GroupType', description='The type of the instance group. Valid values:

*   0: the default group.
*   1: a group for which canary traffic management is not enabled.
*   2: a group for which canary traffic management is enabled.', example='1'),
    id?: string(name='Id', description='The ID of the instance group.', example='577f4c50-16ee-43d8-a02b-667*********'),
    packageVersionId?: string(name='PackageVersionId', description='The version of the deployment package that was used to deploy an application in the instance group.

*   If an application is deployed in the instance group, a string of random numbers is returned.
*   If no application is deployed in the instance group, the return value is empty.', example='****7b93-8d62-4e34***********'),
    updateTime?: long(name='UpdateTime', description='The time when the instance group was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573627695779'),
  }(name='DeployGroupEntity', description='The information about the instance group.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='3RD9-D3FRE****************'),
}

model InsertDeployGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertDeployGroupResponseBody(name='body'),
}

/**
 * @summary Creates an instance group for a specified application.
 *
 * @param request InsertDeployGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertDeployGroupResponse
 */
async function insertDeployGroupWithOptions(request: InsertDeployGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertDeployGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.initPackageVersionId)) {
    query['InitPackageVersionId'] = request.initPackageVersionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertDeployGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/deploy_group`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an instance group for a specified application.
 *
 * @param request InsertDeployGroupRequest
 * @return InsertDeployGroupResponse
 */
async function insertDeployGroup(request: InsertDeployGroupRequest): InsertDeployGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertDeployGroupWithOptions(request, headers, runtime);
}

model InsertK8sApplicationRequest {
  annotations?: string(name='Annotations', description='The annotation of an application pod.', example='{"annotation-name-1":"annotation-value-1","annotation-name-2":"annotation-value-2"}'),
  appConfig?: string(name='AppConfig', description='The application configuration when the application template is used. Set this parameter to a JSON array.', example='{}'),
  appName?: string(name='AppName', description='The name of the application. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 36 characters in length.

This parameter is required.', example='doc-test'),
  appTemplateName?: string(name='AppTemplateName', description='The name of the template used to create the application. If you specify an application template when you create an application, the application template and the AppConfig parameter are used to configure the application. Other configurations are ignored.', example='app-template001'),
  applicationDescription?: string(name='ApplicationDescription', description='The description of the application.', example='Application in the production environment'),
  buildPackId?: string(name='BuildPackId', description='The version of `EDAS Container`. The value of this parameter conflicts with that of the `EdasContainerVersion` parameter. We recommend that you use the `EdasContainerVersion` parameter.', example='-1'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster. You can call the ListCluster operation to query the cluster ID. For more information, see [ListCluster](https://help.aliyun.com/document_detail/154995.html).

This parameter is required.', example='c9cd****'),
  command?: string(name='Command', description='The application startup command. If you specify this parameter, the value of this parameter will replace the startup command in the image.', example='ls'),
  commandArgs?: string(name='CommandArgs', description='The arguments in the command. The parameter value is a JSON array of strings. An example is `[{"argument":"-c"},{"argument":"test"}]`, where `-c` and `test` are two arguments that can be set.', example='[{"argument":"-lh"}]'),
  configMountDescs?: string(name='ConfigMountDescs', description='The configuration for mounting a Kubernetes ConfigMap or Secret to a directory in an elastic container instance. The following parameters are included in the configuration:

*   name: the name of the Kubernetes ConfigMap or Secret.
*   type: the type of the API object that you want to mount. You can mount a Kubernetes ConfigMap or Secret.
*   mountPath: the mount path. The mount path must be an absolute path that starts with a forward slash (/).', example='[{"name":"nginx-config","type":"ConfigMap","mountPath":"/etc/nginx"},{"name":"tls-secret","type":"secret","mountPath":"/etc/ssh"}]'),
  containerRegistryId?: string(name='ContainerRegistryId', description='The ID of the repository used to build the image repository. If this parameter is left empty, the default repository provided by EDAS is used. Only the default repository provided by EDAS is supported.', example='Leave empty'),
  csClusterId?: string(name='CsClusterId', description='The ID of the cluster. This parameter is required only when you create the application in a cluster that has not been imported.', example='abcdefg'),
  customAffinity?: string(name='CustomAffinity', description='The custom affinity.', example='demo'),
  customAgentVersion?: string(name='CustomAgentVersion'),
  customTolerations?: string(name='CustomTolerations', description='The custom tolerances.', example='demo'),
  deployAcrossNodes?: string(name='DeployAcrossNodes', description='Specifies whether to distribute application instances across nodes. Value `true` indicates that application instances are distributed across nodes. Other values indicate that application instances are not distributed across nodes.', example='true'),
  deployAcrossZones?: string(name='DeployAcrossZones', description='Specifies whether to distribute application instances across zones. Value `true` indicates that application instances are distributed across zones. Other values indicate that application instances are not distributed across zones.', example='true'),
  edasContainerVersion?: string(name='EdasContainerVersion', description='The version of `EDAS Container` on which the deployment package of the application depends.

> This parameter is unavailable if you deploy applications by using images.', example='3.5.9'),
  emptyDirs?: string(name='EmptyDirs', description='The configuration for mounting a Kubernetes emptyDir volume to a directory in an elastic container instance. The following parameters are included in the configuration:

*   mountPath: The mount path in the container. This parameter is required.
*   readOnly: (Optional) The mount mode. Value true indicates the read-only mode. Value false indicates the read and write mode. Default value: false.
*   subPathExpr: (Optional) The regular expression that is used to match the subdirectory.', example='[{"mountPath":"/app-log","subPathExpr":"$(POD_IP)"},{"readOnly":true,"mountPath":"/etc/nginx"}]'),
  enableAhas?: boolean(name='EnableAhas', description='Specifies whether to enable access to Application High Availability Service (AHAS). Valid values:

*   true: enables access to AHAS.
*   false: does not enable access to AHAS.', example='true'),
  enableAsm?: boolean(name='EnableAsm', description='Specifies whether to activate Alibaba Cloud Service Mesh (ASM). Set this parameter to true only when you create the application in a cluster that has not been imported and you need to use ASM.', example='false'),
  enableEmptyPushReject?: boolean(name='EnableEmptyPushReject', description='Specifies whether to enable the empty list protection feature. Valid values:

*   true: enables the empty list protection feature.
*   false: disables the empty list protection feature.', example='false'),
  enableLosslessRule?: boolean(name='EnableLosslessRule', description='Specifies whether to enable graceful start rules. Valid values:

*   true: enables graceful start rules.
*   false: disables graceful start rules.', example='true'),
  envFroms?: string(name='EnvFroms', description='The Kubernetes environment variables that are configured in EnvFrom mode. A ConfigMap or Secret is mounted to a directory. Each key corresponds to a file in the directory, and the content of the file is the value of the key.

The following parameters are included in the configuration:

*   configMapRef: the ConfigMap that is referenced. The following parameter is contained:

    *   name: the name of the ConfigMap.

*   secretRef: the Secret that is referenced. The following parameter is contained:

    *   name: the name of the Secret.', example='[{"name":"appname","valueFrom":{"configMapKeyRef":{"name":"appconf","key":"name"}}}]'),
  envs?: string(name='Envs', description='The environment variables that are used to deploy the application. The value must be a JSON array. Valid values: regular environment variables, Kubernetes ConfigMap environment variables, or Kubernetes Secret environment variables. Specify regular environment variables in the following format:

`{"name":"x", "value": "y"}`

Specify Kubernetes ConfigMap environment variables in the following format to reference values from ConfigMaps:

`{ "name": "x2", "valueFrom": { "configMapKeyRef": { "name": "my-config", "key": "y2" } } }`

Specify Kubernetes Secret environment variables in the following format to reference values from Secrets:

`{ "name": "x3", "valueFrom": { "secretKeyRef": { "name": "my-secret", "key": "y3" } } }`

>  If you want to cancel this configuration, set this parameter to an empty JSON array in the format of "[]".', example='[{"name":"x1","value":"y1"},{"name":"x2","valueFrom":{"configMapKeyRef":{"name":"my-config","key":"y2"}}},{"name":"x3","valueFrom":{"secretKeyRef":{"name":"my-secret","key":"y3"}}}]'),
  featureConfig?: string(name='FeatureConfig'),
  imagePlatforms?: string(name='ImagePlatforms', description='Mirror the target platform architecture, which is effective when deployed using war or jar. Enter an example:

- Specify x86 64 architecture: Linux/amd64
- Specify ARM 64 architecture: Linux/arm64
- Specify the construction of dual architecture images: Linux/amd64, Linux/arm64
- Do not input: default schema'),
  imageUrl?: string(name='ImageUrl', description='The URL of the image. This parameter is required if you set the `PackageType` parameter to `Image`.', example='registry.cn-beijing.aliyuncs.com/****_test/****-cons****:1.0'),
  initContainers?: string(name='InitContainers', description='Set the initialization container for the application Pod. Support setting the format YAML for container configuration, which is the value of Init container YAML configured with base64 encoding.', example='[
      {
            "yamlEncoded": "Y29tbWFuZDoKICAtIHNsZWVwCiAgLSAnNjAnCmltYWdlOiAnYnVzeWJveDpsYXRlc3QnCm5hbWU6IGluaXQtYnVzeWJveAo="
      }
]'),
  internetSlbId?: string(name='InternetSlbId', description='The ID of the Internet-facing SLB instance. If you do not specify this parameter, EDAS automatically purchases a new SLB instance for you.', example='a3d4********'),
  internetSlbPort?: int32(name='InternetSlbPort', description='The frontend port of the Internet-facing SLB instance. Valid values: 1 to 65535.', example='80'),
  internetSlbProtocol?: string(name='InternetSlbProtocol', description='The protocol used by the Internet-facing SLB instance. Valid values: TCP, HTTP, and HTTPS.', example='TCP'),
  internetTargetPort?: int32(name='InternetTargetPort', description='The backend port of the internal-facing SLB instance. This port also serves as the service port of the application. Valid values: 1 to 65535.', example='8080'),
  intranetSlbId?: string(name='IntranetSlbId', description='The ID of the internal-facing SLB instance. If you do not specify this parameter, Enterprise Distributed Application Service (EDAS) automatically purchases a new SLB instance for you.', example='ae93********'),
  intranetSlbPort?: int32(name='IntranetSlbPort', description='The frontend port of the internal-facing SLB instance. Valid values: 1 to 65535.', example='80'),
  intranetSlbProtocol?: string(name='IntranetSlbProtocol', description='The protocol used by the internal-facing SLB instance. Valid values: TCP, HTTP, and HTTPS.', example='TCP'),
  intranetTargetPort?: int32(name='IntranetTargetPort', description='The backend port of the internal-facing Server Load Balancer (SLB) instance. This port also serves as the service port of the application. Valid values: 1 to 65535.', example='80'),
  isMultilingualApp?: boolean(name='IsMultilingualApp', description='Specifies whether the application is a multi-language application.', example='true'),
  JDK?: string(name='JDK', description='The version of the Java Development Kit (JDK) on which the deployment package of the application depends. Valid values: Open JDK 7 and Open JDK 8. This parameter is unavailable if you deploy applications by using images.', example='Open JDK 8'),
  javaStartUpConfig?: string(name='JavaStartUpConfig', description='The configuration of Java startup parameters for a Java application. These startup parameters involve the memory, application, garbage collection (GC) policy, tools, service registration and discovery, and custom configurations. Appropriate parameter settings help reduce the GC overheads, shorten the server response time, and improve the throughput. Set this parameter to a JSON string. In the example, original indicates the configuration value, and startup indicates a startup parameter. The system automatically concatenates all startup values as the settings of Java startup parameters for the application. To delete this configuration, leave the parameter value empty by entering `""` or `"{}"`. The following parameters are included in the configuration:

*   InitialHeapSize: the initial size of the heap memory.
*   MaxHeapSize: the maximum size of the heap memory.
*   CustomParams: the custom parameters, such as JVM -D parameters.
*   Other parameters: You can view the JSON structure submitted by the frontend.', example='{"InitialHeapSize":{"original":512,"startup":"-Xms512m"},"MaxHeapSize":{"original":1024,"startup":"-Xmx1024m"},"CustomParams":{"original":"-Dcustom.property.sample=false","startup":"-Dcustom.property.sample=false"}}'),
  labels?: string(name='Labels', description='The label of an application pod.', example='{"label-name-1":"label-value-1","label-name-2":"label-value-2"}'),
  limitCpu?: int32(name='LimitCpu', description='The maximum number of CPU cores allowed for each application instance when the application is running. Unit: cores. If the LimitmCpu parameter is specified, you can ignore this parameter.', example='4'),
  limitEphemeralStorage?: int32(name='LimitEphemeralStorage', description='The maximum size of space required by ephemeral storage. Unit: GB. Value 0 indicates that no limit is set on the space size.', example='4'),
  limitMem?: int32(name='LimitMem', description='The maximum size of memory allowed for each application instance when the application is running. Unit: MB. The value of LimitMem must be greater than that of RequestsMem.', example='2'),
  limitmCpu?: int32(name='LimitmCpu', description='The maximum number of CPU cores allowed for each application instance when the application is running. Unit: millicores. Value 0 indicates that no limit is set on CPU cores.', example='1000'),
  liveness?: string(name='Liveness', description='The configuration for the liveness check on the container. Example: `{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}}`.

If you want to cancel this configuration, leave the parameter value empty by entering `""` or `{}`. If you do not specify this parameter, this configuration is ignored.', example='{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}}'),
  localVolume?: string(name='LocalVolume', description='The configurations that are used when the host files are mounted to the container on which the application is running. Example: `[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}\\\\]`. Description:

*   `nodePath`: the host path.
*   `mountPath`: the path in the container.
*   `type`: the mounting type.', example='[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}]'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the EDAS namespace. This parameter is required for a non-default namespace.', example='cn-shenzhen:beta****'),
  losslessRuleAligned?: boolean(name='LosslessRuleAligned', description='Specifies whether to enable the graceful rolling deployment mode and ensure that the service is registered before the readiness check. Valid values:

*   true: provides port 55199 and the /health path for the health check in a non-intrusive manner. When the service is registered, the system returns HTTP 200 status code. Otherwise, the system returns HTTP 500 status code.

    **

    **Note**If you set both the `LosslessRuleRelated` parameter and this parameter to `true`, the operation checks whether the service prefetching is complete.

*   false: does not check whether the service is registered.', example='false'),
  losslessRuleDelayTime?: int32(name='LosslessRuleDelayTime', description='The delay of service registration. Valid values: 0 to 86400. Unit: seconds.', example='0'),
  losslessRuleFuncType?: int32(name='LosslessRuleFuncType', description='The number of prefetching curves. Valid values: 0 to 20. The default value is 2, which is suitable for common prefetching scenarios. This value indicates that the received traffic of the provider during prefetching is displayed as a quadratic curve.', example='2'),
  losslessRuleRelated?: boolean(name='LosslessRuleRelated', description='Specifies whether to enable the graceful rolling deployment mode and ensure that the service prefetching is complete before the readiness check. Valid values:

*   true: provides port 55199 and the /health path for the health check in a non-intrusive manner. When the service prefetching is complete, the system returns HTTP 200 status code. Otherwise, the system returns HTTP 500 status code.
*   false: does not check whether the service prefetching is complete.', example='false'),
  losslessRuleWarmupTime?: int32(name='LosslessRuleWarmupTime', description='The service prefetching duration. Valid values: 0 to 86400. Unit: seconds.', example='120'),
  mountDescs?: string(name='MountDescs', description='The description of the NAS mounting configuration. Set this parameter to a serialized JSON string. Example: `[{"nasPath": "/k8s","mountPath": "/mnt"},{"nasPath": "/files","mountPath": "/app/files"}\\\\]`. The `nasPath` parameter specifies the file storage path, and the `mountPath` parameter specifies the path to mount the file system to the container where the application is running.', example='[{"nasPath": "/k8s","mountPath": "/mnt"},{"nasPath": "/files","mountPath": "/app/files"}]'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster. This parameter specifies the Kubernetes namespace in which your application is deployed. By default, the default namespace is used.', example='default'),
  nasId?: string(name='NasId', description='The ID of the Network Attached Storage (NAS) file system that you want to mount to the application. If you do not specify this parameter but specify the MountDescs parameter, a NAS file system is automatically purchased and mounted to the vSwitch in the VPC.', example='dfs23****'),
  packageType?: string(name='PackageType', description='The type of the deployment package. Valid values: FatJar, WAR, and Image.', example='WAR'),
  packageUrl?: string(name='PackageUrl', description='The URL of the deployment package. This parameter is required if you use a FatJar or WAR package to deploy the application.

> The version of EDAS SDK for Java or Python must be V2.44.0 or later.', example='https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar'),
  packageVersion?: string(name='PackageVersion', description='The version of the deployment package. This parameter is required if you use a FatJar or WAR package to deploy the application. You must specify a version.

> The version of EDAS SDK for Java or Python must be V2.44.0 or later.', example='20200720'),
  postStart?: string(name='PostStart', description='The post-start script. Example: `{"exec":{"command":["cat","/etc/group"\\\\]}}`.

If you want to cancel this configuration, leave this parameter empty by setting it to `""` or `{}`. If you do not specify this parameter, this configuration is ignored.', example='{\\\\"exec\\\\":{\\\\"command\\\\":[\\\\"ls\\\\",\\\\"/\\\\"]}}"'),
  preStop?: string(name='PreStop', description='The pre-stop script. Example: `{"tcpSocket":{"host":"", "port":8080}}`.

If you want to cancel this configuration, leave this parameter empty by setting it to `""` or `{}`. If you do not specify this parameter, this configuration is ignored.', example='{\\\\"exec\\\\":{\\\\"command\\\\":[\\\\"ls\\\\",\\\\"/\\\\"]}}"'),
  pvcMountDescs?: string(name='PvcMountDescs', description='The configuration for mounting a Kubernetes PersistentVolumeClaim (PVC) volume to a directory in an elastic container instance. The following parameters are included in the configuration:

*   pvcName: the name of the PVC volume. Make sure that the PVC volume is an existing volume and is in the Bound state.

*   mountPaths: the directory to which you want to mount the PVC volume. You can configure multiple directories. You can set the following two parameters for each mount directory:

    *   mountPath: the mount path. The mount path must be an absolute path that starts with a forward slash (/).
    *   readOnly: the mount mode. Value true indicates the read-only mode. Value false indicates the read and write mode. Default value: false.', example='[{"pvcName":"nas-pvc-1","mountPaths":[{"mountPath":"/usr/share/nginx/data"},{"mountPath":"/usr/share/nginx/html","readOnly":true}]}]'),
  readiness?: string(name='Readiness', description='The configuration for the readiness check on the container. If the check fails, the traffic that passes through the Kubernetes Service is not transmitted to the container. Example: \\\\`{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": \\[{"name": "test","value": "testvalue"}\\\\\\\\]}}\\\\`.``

If you want to cancel this configuration, leave the parameter value empty by entering `""` or `{}`. If you do not specify this parameter, this configuration is ignored.', example='{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": [{"name": "test","value": "testvalue"}]}}'),
  replicas?: int32(name='Replicas', description='The number of application instances.', example='4'),
  repoId?: string(name='RepoId', description='The ID of the image repository.', example='ced********'),
  requestsCpu?: int32(name='RequestsCpu', description='The maximum number of CPU cores allowed for each application instance when the application is created. Unit: cores. Value 0 indicates that no limit is set on CPU cores. If the RequestsmCpu parameter is specified, the value of the RequestsmCpu parameter is used. You can ignore this parameter.', example='0'),
  requestsEphemeralStorage?: int32(name='RequestsEphemeralStorage', description='The minimum size of space required by ephemeral storage. Unit: GB. Value 0 indicates that no limit is set on the space size.', example='2'),
  requestsMem?: int32(name='RequestsMem', description='The maximum size of memory allowed for each application instance when the application is created. Unit: MB. Value 0 indicates that no limit is set on the memory size. The value of RequestsMem cannot be greater than that of LimitMem.', example='0'),
  requestsmCpu?: int32(name='RequestsmCpu', description='The maximum number of CPU cores allowed for each application instance when the application is created. Unit: millicores.', example='500'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='461'),
  runtimeClassName?: string(name='RuntimeClassName', description='The type of the container runtime. This parameter is applicable only to clusters that use sandboxed containers.', example='runc'),
  secretName?: string(name='SecretName', description='The name of the credential that is used to pull the images specified by the user. You must configure the Secret.', example='edas-app-01-image-secret'),
  serviceConfigs?: string(name='ServiceConfigs', description='The configurations of services in a Kubernetes cluster.', example='[{"name": "test-svc-create","serviceType":"ClusterIP","portMappings":[{"servicePort": {"targetPort":8080,"port":80,"protocol":"TCP"}}]}]'),
  sidecars?: string(name='Sidecars', description='Set up a Sidecar container for the application Pod. Support setting the format YAML for container configuration, which is the value of Sidecar container YAML configured with base64 encoding.', example='[{"yamlEncoded":"Y29tbWFuZDoKICAtIHRhaWwKICAtICctZicKICAtIC9kZXYvbnVsbAppbWFnZTogJ2J1c3lib3g6bGF0ZXN0JwpuYW1lOiBidXN5Ym94Cg=="}]'),
  slsConfigs?: string(name='SlsConfigs', description='The Logstore configuration. To delete this configuration, leave the parameter value empty by entering `""` or `"{}"`.

*   The following parameters are included in the configuration:

    *   type: the collection type. Set this parameter to file to specify the file type. Set this parameter to stdout to specify the standard output type.

    *   logstore: the name of the Logstore. Make sure that the name of the Logstore is unique in the cluster. The name must comply with the following rules:

        *   The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
        *   The name must start and end with a lowercase letter or a digit.
        *   The name must be 3 to 63 characters in length. If you leave this parameter empty, the system automatically generates a name.

    *   LogDir: If the standard output type is used, the collection path is stdout.log. If the file type is used, the collection path is the path of the collected file. Wildcards (\\\\*) are supported. The collection path must match the following regular expression: `^/(.+)/(.*)^/$`.', example='[{"logstore":"thisisanotherfilelog","type":"file","logDir":"/var/log/*"},{"logstore":"","type":"stdout","logDir":"stdout.log"},{"logstore":"thisisafilelog","type":"file","logDir":"/tmp/log/*"}]'),
  startup?: string(name='Startup', description='The startup probe can be used to detect the viability of slow start containers, avoiding them from being killed before startup. The format is as follows: {"FailureThreshold": 3, "initialDelaySeconds": 5, "SuccessThreshold": 1, "timeoutSeconds": 1, "https Get": {"path": "/consumer", "port": 8080, "scheme": "HTTP", "https Headers": [{"name": "test", "value": "testvalue"}]}.

If set to "" or {}, it means delete, and if not set, it means ignore.', example='{"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}}'),
  storageType?: string(name='StorageType', description='The storage type of the NAS file system.

*   Valid values for General-purpose NAS file systems: Capacity and Performance.
*   Valid values for Extreme NAS file systems: Standard and Advance.

You can set this parameter only to Performance.', example='Performance'),
  terminateGracePeriod?: int32(name='TerminateGracePeriod', description='Set the grace stop timeout for the application. Unit: seconds.', example='120'),
  timeout?: int32(name='Timeout', description='The timeout period of the change process. Valid values: 1 to 1800. Unit: seconds. If you do not specify this Unidentifiedparameter, the default value 1800 is used.', example='60'),
  uriEncoding?: string(name='UriEncoding', description='The URI encoding scheme. Valid values: ISO-8859-1, GBK, GB2312, and UTF-8.

> If you do not specify this parameter in the application configurations, the default URI encoding scheme in the Tomcat container is applied.', example='GBK'),
  useBodyEncoding?: boolean(name='UseBodyEncoding', description='Specifies whether to use the encoding scheme specified in the request body for URI query parameters.

> If this parameter is not specified in application configuration, the default value false is applied.', example='false'),
  userBaseImageUrl?: string(name='UserBaseImageUrl', description='When using custom JDK runtime, it is necessary to configure the basic image address. The address needs to be publicly accessible, and the EDAS server will pull the image to build the application image.', example='openjdk:8u302'),
  webContainer?: string(name='WebContainer', description='The version of the Tomcat container on which the deployment package of the application depends. This parameter is applicable to Spring Cloud and Dubbo applications that you deploy by using WAR packages. This parameter is unavailable if you deploy applications by using images.', example='apache-tomcat-7.0.91'),
  webContainerConfig?: string(name='WebContainerConfig', description='The configuration of the Tomcat container. If you want to cancel this configuration, set this parameter to "" or "{}". The following parameters are included in the configuration:

*   useDefaultConfig: specifies whether to use the default configuration. Value true indicates that the default configuration is used. Value false indicates that the custom configuration is used. If the default configuration is used, the following parameters do not take effect:

*   contextInputType: the type of the access path for the application. Valid values:

    *   war: The access path is the name of the WAR package. You do not need to specify a custom path.
    *   root: The access path for the application is `/`. You do not need to specify a custom path.
    *   custom: If you select this option, you must specify a custom path for the contextPath parameter.

*   contextPath: the custom access path for the application. This parameter is required only when you set the contextInputType parameter to custom.

*   httpPort: the port number. The port number ranges from 1024 to 65535. Though the admin permissions are configured for the container, the root permissions are required to perform operations on ports whose number is less than 1024. Enter a value that ranges from 1024 to 65535 because the container has only the admin permissions. If you do not configure this parameter, the default port number 8080 is used.

*   maxThreads: the maximum number of connections in the connection pool. Default value: 400.

    **

    **Note**This parameter significantly affects application performance. We recommend that you consult with technical support before you set this parameter.

*   uriEncoding: the URI encoding scheme in the Tomcat container. Valid values: UTF-8, ISO-8859-1, GBK, and GB2312. If you do not specify this parameter, the default value ISO-8859-1 is used.

*   useBodyEncoding: specifies whether to use the encoding scheme specified in the request body for URI query parameters.

*   useAdvancedServerXml: specifies whether to use advanced configurations to customize the server.xml file. If the preceding parameter types and specific parameters cannot meet your requirements, you can use advanced configurations to customize the server.xml file of Tomcat.

*   serverXml: the content of the server.xml file customized by using advanced configurations. This parameter takes effect only when you set the useAdvancedServerXml parameter to true.', example='{"useDefaultConfig":false,"contextInputType":"custom","contextPath":"hello","httpPort":8088,"maxThreads":400,"uriEncoding":"UTF-8","useBodyEncoding":true,"useAdvancedServerXml":false}'),
  workloadType?: string(name='WorkloadType', description='The type of Workload when creating an application is currently only supported for the Deployment type.', example='Deployment'),
}

model InsertK8sApplicationResponseBody = {
  applicationInfo?: {
    appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='e83acea6-****-47e1-96ae-c0e95377****'),
    appName?: string(name='AppName', description='The name of the application.', example='test'),
    changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process. You can call the GetChangeOrderInfo operation to query the change process ID. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).', example='cd65b247-****-475b-ad4b-7039040d625c'),
    clusterType?: int32(name='ClusterType', description='The type of the cluster. Valid values:

*   0: regular Docker cluster
*   1: Swarm cluster (discontinued)
*   2: Elastic Compute Service (ECS) cluster
*   3: self-managed Kubernetes cluster in EDAS (discontinued)
*   4: cluster in which Pandora automatically registers applications
*   5: ACK cluster and serverless Kubernetes cluster', example='5'),
    dockerize?: boolean(name='Dockerize', description='Indicates whether the application is a Docker application.

*   true: The application is a Docker application.
*   false: The application is not a Docker application.', example='true'),
    edasId?: string(name='EdasId', description='The ID of the user to which the application belongs. This ID is generated by EDAS.', example='1172****6608****'),
    owner?: string(name='Owner', description='The owner of the application.', example='zp'),
    regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
    userId?: string(name='UserId', description='The ID of the Alibaba Cloud account to which the application belongs.', example='edas_test****@aliyun****.com'),
  }(name='ApplicationInfo', description='The details of the application.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
}

model InsertK8sApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertK8sApplicationResponseBody(name='body'),
}

/**
 * @summary Creates an application in a Container Service for Kubernetes (ACK) cluster or serverless Kubernetes cluster.
 *
 * @param request InsertK8sApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertK8sApplicationResponse
 */
async function insertK8sApplicationWithOptions(request: InsertK8sApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertK8sApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.annotations)) {
    query['Annotations'] = request.annotations;
  }
  if (!Util.isUnset(request.appConfig)) {
    query['AppConfig'] = request.appConfig;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.appTemplateName)) {
    query['AppTemplateName'] = request.appTemplateName;
  }
  if (!Util.isUnset(request.applicationDescription)) {
    query['ApplicationDescription'] = request.applicationDescription;
  }
  if (!Util.isUnset(request.buildPackId)) {
    query['BuildPackId'] = request.buildPackId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.command)) {
    query['Command'] = request.command;
  }
  if (!Util.isUnset(request.commandArgs)) {
    query['CommandArgs'] = request.commandArgs;
  }
  if (!Util.isUnset(request.configMountDescs)) {
    query['ConfigMountDescs'] = request.configMountDescs;
  }
  if (!Util.isUnset(request.containerRegistryId)) {
    query['ContainerRegistryId'] = request.containerRegistryId;
  }
  if (!Util.isUnset(request.csClusterId)) {
    query['CsClusterId'] = request.csClusterId;
  }
  if (!Util.isUnset(request.customAffinity)) {
    query['CustomAffinity'] = request.customAffinity;
  }
  if (!Util.isUnset(request.customAgentVersion)) {
    query['CustomAgentVersion'] = request.customAgentVersion;
  }
  if (!Util.isUnset(request.customTolerations)) {
    query['CustomTolerations'] = request.customTolerations;
  }
  if (!Util.isUnset(request.deployAcrossNodes)) {
    query['DeployAcrossNodes'] = request.deployAcrossNodes;
  }
  if (!Util.isUnset(request.deployAcrossZones)) {
    query['DeployAcrossZones'] = request.deployAcrossZones;
  }
  if (!Util.isUnset(request.edasContainerVersion)) {
    query['EdasContainerVersion'] = request.edasContainerVersion;
  }
  if (!Util.isUnset(request.emptyDirs)) {
    query['EmptyDirs'] = request.emptyDirs;
  }
  if (!Util.isUnset(request.enableAhas)) {
    query['EnableAhas'] = request.enableAhas;
  }
  if (!Util.isUnset(request.enableAsm)) {
    query['EnableAsm'] = request.enableAsm;
  }
  if (!Util.isUnset(request.enableEmptyPushReject)) {
    query['EnableEmptyPushReject'] = request.enableEmptyPushReject;
  }
  if (!Util.isUnset(request.enableLosslessRule)) {
    query['EnableLosslessRule'] = request.enableLosslessRule;
  }
  if (!Util.isUnset(request.envFroms)) {
    query['EnvFroms'] = request.envFroms;
  }
  if (!Util.isUnset(request.envs)) {
    query['Envs'] = request.envs;
  }
  if (!Util.isUnset(request.featureConfig)) {
    query['FeatureConfig'] = request.featureConfig;
  }
  if (!Util.isUnset(request.imagePlatforms)) {
    query['ImagePlatforms'] = request.imagePlatforms;
  }
  if (!Util.isUnset(request.imageUrl)) {
    query['ImageUrl'] = request.imageUrl;
  }
  if (!Util.isUnset(request.initContainers)) {
    query['InitContainers'] = request.initContainers;
  }
  if (!Util.isUnset(request.internetSlbId)) {
    query['InternetSlbId'] = request.internetSlbId;
  }
  if (!Util.isUnset(request.internetSlbPort)) {
    query['InternetSlbPort'] = request.internetSlbPort;
  }
  if (!Util.isUnset(request.internetSlbProtocol)) {
    query['InternetSlbProtocol'] = request.internetSlbProtocol;
  }
  if (!Util.isUnset(request.internetTargetPort)) {
    query['InternetTargetPort'] = request.internetTargetPort;
  }
  if (!Util.isUnset(request.intranetSlbId)) {
    query['IntranetSlbId'] = request.intranetSlbId;
  }
  if (!Util.isUnset(request.intranetSlbPort)) {
    query['IntranetSlbPort'] = request.intranetSlbPort;
  }
  if (!Util.isUnset(request.intranetSlbProtocol)) {
    query['IntranetSlbProtocol'] = request.intranetSlbProtocol;
  }
  if (!Util.isUnset(request.intranetTargetPort)) {
    query['IntranetTargetPort'] = request.intranetTargetPort;
  }
  if (!Util.isUnset(request.isMultilingualApp)) {
    query['IsMultilingualApp'] = request.isMultilingualApp;
  }
  if (!Util.isUnset(request.JDK)) {
    query['JDK'] = request.JDK;
  }
  if (!Util.isUnset(request.javaStartUpConfig)) {
    query['JavaStartUpConfig'] = request.javaStartUpConfig;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.limitCpu)) {
    query['LimitCpu'] = request.limitCpu;
  }
  if (!Util.isUnset(request.limitEphemeralStorage)) {
    query['LimitEphemeralStorage'] = request.limitEphemeralStorage;
  }
  if (!Util.isUnset(request.limitMem)) {
    query['LimitMem'] = request.limitMem;
  }
  if (!Util.isUnset(request.limitmCpu)) {
    query['LimitmCpu'] = request.limitmCpu;
  }
  if (!Util.isUnset(request.liveness)) {
    query['Liveness'] = request.liveness;
  }
  if (!Util.isUnset(request.localVolume)) {
    query['LocalVolume'] = request.localVolume;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }
  if (!Util.isUnset(request.losslessRuleAligned)) {
    query['LosslessRuleAligned'] = request.losslessRuleAligned;
  }
  if (!Util.isUnset(request.losslessRuleDelayTime)) {
    query['LosslessRuleDelayTime'] = request.losslessRuleDelayTime;
  }
  if (!Util.isUnset(request.losslessRuleFuncType)) {
    query['LosslessRuleFuncType'] = request.losslessRuleFuncType;
  }
  if (!Util.isUnset(request.losslessRuleRelated)) {
    query['LosslessRuleRelated'] = request.losslessRuleRelated;
  }
  if (!Util.isUnset(request.losslessRuleWarmupTime)) {
    query['LosslessRuleWarmupTime'] = request.losslessRuleWarmupTime;
  }
  if (!Util.isUnset(request.mountDescs)) {
    query['MountDescs'] = request.mountDescs;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.nasId)) {
    query['NasId'] = request.nasId;
  }
  if (!Util.isUnset(request.packageType)) {
    query['PackageType'] = request.packageType;
  }
  if (!Util.isUnset(request.packageUrl)) {
    query['PackageUrl'] = request.packageUrl;
  }
  if (!Util.isUnset(request.packageVersion)) {
    query['PackageVersion'] = request.packageVersion;
  }
  if (!Util.isUnset(request.postStart)) {
    query['PostStart'] = request.postStart;
  }
  if (!Util.isUnset(request.preStop)) {
    query['PreStop'] = request.preStop;
  }
  if (!Util.isUnset(request.pvcMountDescs)) {
    query['PvcMountDescs'] = request.pvcMountDescs;
  }
  if (!Util.isUnset(request.readiness)) {
    query['Readiness'] = request.readiness;
  }
  if (!Util.isUnset(request.replicas)) {
    query['Replicas'] = request.replicas;
  }
  if (!Util.isUnset(request.repoId)) {
    query['RepoId'] = request.repoId;
  }
  if (!Util.isUnset(request.requestsCpu)) {
    query['RequestsCpu'] = request.requestsCpu;
  }
  if (!Util.isUnset(request.requestsEphemeralStorage)) {
    query['RequestsEphemeralStorage'] = request.requestsEphemeralStorage;
  }
  if (!Util.isUnset(request.requestsMem)) {
    query['RequestsMem'] = request.requestsMem;
  }
  if (!Util.isUnset(request.requestsmCpu)) {
    query['RequestsmCpu'] = request.requestsmCpu;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.runtimeClassName)) {
    query['RuntimeClassName'] = request.runtimeClassName;
  }
  if (!Util.isUnset(request.secretName)) {
    query['SecretName'] = request.secretName;
  }
  if (!Util.isUnset(request.serviceConfigs)) {
    query['ServiceConfigs'] = request.serviceConfigs;
  }
  if (!Util.isUnset(request.sidecars)) {
    query['Sidecars'] = request.sidecars;
  }
  if (!Util.isUnset(request.slsConfigs)) {
    query['SlsConfigs'] = request.slsConfigs;
  }
  if (!Util.isUnset(request.startup)) {
    query['Startup'] = request.startup;
  }
  if (!Util.isUnset(request.storageType)) {
    query['StorageType'] = request.storageType;
  }
  if (!Util.isUnset(request.terminateGracePeriod)) {
    query['TerminateGracePeriod'] = request.terminateGracePeriod;
  }
  if (!Util.isUnset(request.timeout)) {
    query['Timeout'] = request.timeout;
  }
  if (!Util.isUnset(request.uriEncoding)) {
    query['UriEncoding'] = request.uriEncoding;
  }
  if (!Util.isUnset(request.useBodyEncoding)) {
    query['UseBodyEncoding'] = request.useBodyEncoding;
  }
  if (!Util.isUnset(request.userBaseImageUrl)) {
    query['UserBaseImageUrl'] = request.userBaseImageUrl;
  }
  if (!Util.isUnset(request.webContainer)) {
    query['WebContainer'] = request.webContainer;
  }
  if (!Util.isUnset(request.webContainerConfig)) {
    query['WebContainerConfig'] = request.webContainerConfig;
  }
  if (!Util.isUnset(request.workloadType)) {
    query['WorkloadType'] = request.workloadType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertK8sApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/create_k8s_app`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an application in a Container Service for Kubernetes (ACK) cluster or serverless Kubernetes cluster.
 *
 * @param request InsertK8sApplicationRequest
 * @return InsertK8sApplicationResponse
 */
async function insertK8sApplication(request: InsertK8sApplicationRequest): InsertK8sApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertK8sApplicationWithOptions(request, headers, runtime);
}

model InsertOrUpdateRegionRequest {
  debugEnable?: boolean(name='DebugEnable', description='Specifies whether to enable remote debugging. Valid values:

*   true: enables remote debugging.
*   false: disables remote debugging.', example='true'),
  description?: string(name='Description', description='The description of the namespace. The description can be up to 128 characters in length.', example='test'),
  id?: long(name='Id', description='Specifies whether to create or modify the namespace. If this parameter is left empty or is set to 0, the namespace is created. Otherwise, the namespace is modified.', example='0'),
  mseInstanceId?: string(name='MseInstanceId', description='The ID of the MSE registry.', example='mse_prepaid_public_cn-tl32n******'),
  regionName?: string(name='RegionName', description='The name of the namespace. The name can be up to 63 characters in length.

This parameter is required.', example='test_region'),
  regionTag?: string(name='RegionTag', description='The ID of the namespace.

*   The ID of a custom namespace is in the `Region ID:Namespace identifier` format. Example: cn-beijing:tdy218.
*   The ID of the default namespace is in the `region ID` format. Example: cn-beijing.

This parameter is required.', example='cn-beijing:test'),
  registryType?: string(name='RegistryType', description='The type of the registry.

*   default: the shared registry of Enterprise Distributed Application Service (EDAS)
*   exclusive_mse: a Microservices Engine (MSE) registry', example='default'),
}

model InsertOrUpdateRegionResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='37793352-C568-4A5A-BF69-4DC853******'),
  userDefineRegionEntity?: {
    belongRegion?: string(name='BelongRegion', description='The ID of the region to which the namespace belongs.', example='cn-beijing'),
    debugEnable?: boolean(name='DebugEnable', description='Indicates whether remote debugging is enabled. Valid values:

*   true: Remote debugging is enabled.
*   false: Remote debugging is disabled.', example='false'),
    description?: string(name='Description', description='The description of the namespace.', example='Logical region'),
    id?: long(name='Id', description='Indicates whether the namespace is created or modified. If this parameter is left empty or 0 is returned, the namespace is created. Otherwise, the namespace is modified.', example='15160'),
    regionId?: string(name='RegionId', description='The ID of the namespace.

*   The ID of a custom namespace is in the `region ID:namespace identifier` format. Example: cn-beijing:tdy218.
*   The ID of the default namespace is in the `region ID` format. Example: cn-beijing.', example='cn-beijing:test'),
    regionName?: string(name='RegionName', description='The name of the namespace.', example='test_region'),
    userId?: string(name='UserId', description='The ID of the Alibaba Cloud account to which the custom namespace belongs.', example='edas_****_test@aliyun-****.com'),
  }(name='UserDefineRegionEntity', description='The information about the custom namespace.'),
}

model InsertOrUpdateRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertOrUpdateRegionResponseBody(name='body'),
}

/**
 * @summary Creates or edits a custom namespace.
 *
 * @param request InsertOrUpdateRegionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertOrUpdateRegionResponse
 */
async function insertOrUpdateRegionWithOptions(request: InsertOrUpdateRegionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertOrUpdateRegionResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.debugEnable)) {
    query['DebugEnable'] = request.debugEnable;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.mseInstanceId)) {
    query['MseInstanceId'] = request.mseInstanceId;
  }
  if (!Util.isUnset(request.regionName)) {
    query['RegionName'] = request.regionName;
  }
  if (!Util.isUnset(request.regionTag)) {
    query['RegionTag'] = request.regionTag;
  }
  if (!Util.isUnset(request.registryType)) {
    query['RegistryType'] = request.registryType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertOrUpdateRegion',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/user_region_def`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates or edits a custom namespace.
 *
 * @param request InsertOrUpdateRegionRequest
 * @return InsertOrUpdateRegionResponse
 */
async function insertOrUpdateRegion(request: InsertOrUpdateRegionRequest): InsertOrUpdateRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertOrUpdateRegionWithOptions(request, headers, runtime);
}

model InsertRoleRequest {
  actionData?: string(name='ActionData', description='The set of permissions to be granted to the role. The value is in the format of `Permission group ID 1:Permission serial number 1;...;Permission group ID n:Permission serial number n`. Example: `1:1;1:2;2:1;2:2`. For more information about permission groups and permission serial numbers, see [ListAuthority](https://help.aliyun.com/document_detail/149409.html).

This parameter is required.', example='15:1;14:2'),
  roleName?: string(name='RoleName', description='The name of the role.

This parameter is required.', example='testrole'),
}

model InsertRoleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57609587-DFA2-41EC-****-*********'),
  roleId?: int32(name='RoleId', description='The ID of the role.', example='33'),
}

model InsertRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertRoleResponseBody(name='body'),
}

/**
 * @summary Creates a role.
 *
 * @param request InsertRoleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertRoleResponse
 */
async function insertRoleWithOptions(request: InsertRoleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertRoleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.actionData)) {
    query['ActionData'] = request.actionData;
  }
  if (!Util.isUnset(request.roleName)) {
    query['RoleName'] = request.roleName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertRole',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/create_role`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a role.
 *
 * @param request InsertRoleRequest
 * @return InsertRoleResponse
 */
async function insertRole(request: InsertRoleRequest): InsertRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertRoleWithOptions(request, headers, runtime);
}

model InsertServiceGroupRequest {
  groupName?: string(name='GroupName', description='The name of the service group that you want to create.

This parameter is required.', example='edas-test-group'),
}

model InsertServiceGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='ECD1D6FC-4307-4583-BA6F-215F3857EAF4'),
}

model InsertServiceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertServiceGroupResponseBody(name='body'),
}

/**
 * @summary Creates a service group.
 *
 * @param request InsertServiceGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertServiceGroupResponse
 */
async function insertServiceGroupWithOptions(request: InsertServiceGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertServiceGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertServiceGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/service/serviceGroups`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a service group.
 *
 * @param request InsertServiceGroupRequest
 * @return InsertServiceGroupResponse
 */
async function insertServiceGroup(request: InsertServiceGroupRequest): InsertServiceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertServiceGroupWithOptions(request, headers, runtime);
}

model InsertSwimmingLaneRequest {
  appInfos?: string(name='AppInfos', description='The information about applications related to the lane.', example='[{"appId":"f72deaac-26ba-429a-948d-5fa47c4a****"},{"appId":"5049d2c8-f997-4fc9-92a2-153506a6****"}]'),
  enableRules?: boolean(name='EnableRules', description='Specifies whether to enable the throttling rule.', example='true'),
  entryRules?: string(name='EntryRules', description='The throttling conditions.

This parameter is required.', example='[{"priority":1,"path":"/traffic","condition":"AND","restItems":[{"type":"header","name":"testheader","value":"testvalue","cond":"==","operator":"rawvalue"}]}]'),
  groupId?: long(name='GroupId', description='The ID of the lane group.

This parameter is required.', example='95'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the custom namespace. The ID is in the `physical region ID:custom namespace identifier` format. Example: `cn-hangzhou:test`.

This parameter is required.', example='cn-beijing:test'),
  name?: string(name='Name', description='The name of the lane.

This parameter is required.', example='test1'),
  tag?: string(name='Tag', description='The tag.

This parameter is required.', example='tag'),
}

model InsertSwimmingLaneResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    appInfos?: string(name='AppInfos', description='The applications that are associated with lanes.', example='[{"appId":"9dcba109-ee9f-4e67-8916-41
*******"}]'),
    entryRule?: string(name='EntryRule', description='The throttling rule for the lane.

priority: the priority of the throttling rule for the lane. Valid values: 1 to 100.

path: the path that is matched by the throttling rule for the lane.

restItems: conditions to be met.

condition: the relationship among the conditions to be met.

*   AND: all conditions
*   OR: one of the conditions

restItems.type: the type of the rule. Valid values:

*   header: matches by request header.
*   cookie: matches by request cookie.
*   param: matches by request parameters.

restItems.name: the key that matches the rule.

restItems.value: the value that matches the rule.

restItems.cond: the condition that matches the rule. Valid values:

*   "==": The parameter value is equal to the value that you enter in the Value field.
*   "!=": The parameter value is not equal to the value that you enter in the Value field.
*   ">": The parameter value is greater than the value that you enter in the Value field.
*   "<": The parameter value is less than the value that you enter in the Value field.
*   ">=": The parameter value is greater than or equal to the value that you enter in the Value field.
*   "<=": The parameter value is less than or equal to the value that you enter in the Value field.
*   "in": The parameter value is within the values that you enter in the Value field.

restItems.operator: the type of the value. Valid values:

*   rawvalue: the initial value
*   mod: the reminder obtained by performing modulo operation
*   list: the value from the list', example='[{\\\\"condition\\\\":\\\\"AND\\\\",\\\\"enable\\\\":false,\\\\"path\\\\":\\\\"/traffic\\\\",\\\\"priority\\\\":1,\\\\"restItems\\\\":[{\\\\"cond\\\\":\\\\"==\\\\",\\\\"datum\\\\":\\\\"testvalue\\\\",\\\\"name\\\\":\\\\"testheader\\\\",\\\\"operator\\\\":\\\\"rawvalue\\\\",\\\\"type\\\\":\\\\"header\\\\",\\\\"value\\\\":\\\\"testvalue\\\\"}]}]'),
    groupId?: long(name='GroupId', description='The ID of the lane group.', example='95'),
    id?: long(name='Id', description='The ID of the lane.', example='88'),
    name?: string(name='Name', description='The name of the lane.', example='test1'),
    namespaceId?: string(name='NamespaceId', description='The ID of the namespace.', example='cn-beijing:test'),
    swimmingLaneAppRelationShipList?: [ 
      {
        appId?: string(name='AppId', description='The ID of the application.', example='bd170895-096c-4944-9007-d4582c77****'),
        appName?: string(name='AppName', description='The name of the application.', example='test-app'),
        laneId?: long(name='LaneId', description='The ID of the lane.', example='88'),
        rules?: string(name='Rules', description='The association rule.', example='dubbo'),
      }
    ](name='SwimmingLaneAppRelationShipList', description='The association relationships between lanes and applications.'),
    tag?: string(name='Tag', description='The tag of the lane.', example='8202e09'),
  }(name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='75972A87-5682-5277-ADA7-DA2A01BE****'),
}

model InsertSwimmingLaneResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertSwimmingLaneResponseBody(name='body'),
}

/**
 * @summary Creates a lane.
 *
 * @param request InsertSwimmingLaneRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertSwimmingLaneResponse
 */
async function insertSwimmingLaneWithOptions(request: InsertSwimmingLaneRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertSwimmingLaneResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appInfos)) {
    query['AppInfos'] = request.appInfos;
  }
  if (!Util.isUnset(request.enableRules)) {
    query['EnableRules'] = request.enableRules;
  }
  if (!Util.isUnset(request.entryRules)) {
    query['EntryRules'] = request.entryRules;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertSwimmingLane',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/trafficmgnt/swimming_lanes`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a lane.
 *
 * @param request InsertSwimmingLaneRequest
 * @return InsertSwimmingLaneResponse
 */
async function insertSwimmingLane(request: InsertSwimmingLaneRequest): InsertSwimmingLaneResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertSwimmingLaneWithOptions(request, headers, runtime);
}

model InsertSwimmingLaneGroupRequest {
  appIds?: string(name='AppIds', description='IDs of all applications that are related to the lane group. Separate multiple applications with commas (,).

This parameter is required.', example='bdb251cc-02a6-48dd-891b-2ab21b25****,ee33ed0c-fddc-47b5-9f63-e1ccc4be****'),
  entryApp?: string(name='EntryApp', description='The ingress application. The application is in the EDAS:{application ID} format.

This parameter is required.', example='EDAS:5cc89013-9232-4b36-b3eb-ff89b3d2****'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the custom namespace. The ID is in the physical region ID:custom namespace identifier format. Example: cn-hangzhou:test.

This parameter is required.', example='cn-hangzhou:test'),
  name?: string(name='Name', description='The name of the lane group.

This parameter is required.', example='test'),
}

model InsertSwimmingLaneGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    applicationList?: {
      application?: [ 
      {
        appId?: string(name='AppId', description='The ID of the application.', example='bdb251cc-02a6-48dd-891b-2ab21b25****'),
        appName?: string(name='AppName', description='The name of the application.', example='test-app'),
      }
    ](name='Application')
    }(name='ApplicationList', description='The list of all applications that are related to the lane group.'),
    entryApplication?: {
      appId?: string(name='AppId', description='The ID of the application.', example='bdb251cc-02a6-48dd-891b-2ab21b25c****'),
      appName?: string(name='AppName', description='The name of the application.', example='test-app'),
    }(name='EntryApplication', description='The information about the Enterprise Distributed Application Service (EDAS) ingress gateway.'),
    id?: long(name='Id', description='The ID of the lane group.', example='64'),
    name?: string(name='Name', description='The name of the lane group.', example='test'),
    namespaceId?: string(name='NamespaceId', description='The ID of the namespace.', example='cn-hangzhou:test'),
  }(name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D5268CAC-D356-5C8D-BC7C-FBE0D13B****'),
}

model InsertSwimmingLaneGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InsertSwimmingLaneGroupResponseBody(name='body'),
}

/**
 * @summary Creates a lane group.
 *
 * @param request InsertSwimmingLaneGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InsertSwimmingLaneGroupResponse
 */
async function insertSwimmingLaneGroupWithOptions(request: InsertSwimmingLaneGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InsertSwimmingLaneGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.entryApp)) {
    query['EntryApp'] = request.entryApp;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InsertSwimmingLaneGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/trafficmgnt/swimming_lane_groups`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a lane group.
 *
 * @param request InsertSwimmingLaneGroupRequest
 * @return InsertSwimmingLaneGroupResponse
 */
async function insertSwimmingLaneGroup(request: InsertSwimmingLaneGroupRequest): InsertSwimmingLaneGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return insertSwimmingLaneGroupWithOptions(request, headers, runtime);
}

model InstallAgentRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='b3e3f77b-462e-****-****-bec8727a4dc8'),
  doAsync?: boolean(name='DoAsync', description='This parameter is discontinued.', example='true'),
  instanceIds?: string(name='InstanceIds', description='The ID of the ECS instance. Separate multiple IDs with commas (,). Example: instanceId1,instanceId2.

This parameter is required.', example='2ze7s2v0b789k60pk1af'),
}

model InstallAgentResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  executionResultList?: {
    executionResult?: [ 
    {
      finishedTime?: string(name='FinishedTime', description='The time when the installation was complete.', example='20**-11-10T07:02:17Z'),
      instanceId?: string(name='InstanceId', description='The ID of the instance.', example='i-2ze7s2v0b789k*******'),
      invokeRecordStatus?: string(name='InvokeRecordStatus', description='The state of the installation.', example='Finished'),
      status?: string(name='Status', description='The state of the installation command.', example='OK'),
      success?: boolean(name='Success', description='Indicates whether the installation was successful.', example='true'),
    }
  ](name='ExecutionResult')
  }(name='ExecutionResultList', description='The execution result.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
}

model InstallAgentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InstallAgentResponseBody(name='body'),
}

/**
 * @summary Uses the Cloud Assistant provided by Elastic Compute Service (ECS) to install Enterprise Distributed Application Service (EDAS) Agent and imports ECS instances to EDAS.
 *
 * @description If you call this operation to import an ECS instance into EDAS, the operating system of the ECS instance is not reinstalled. We recommend that you call this operation to import ECS instances into EDAS.
 *
 * @param request InstallAgentRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InstallAgentResponse
 */
async function installAgentWithOptions(request: InstallAgentRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InstallAgentResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.doAsync)) {
    query['DoAsync'] = request.doAsync;
  }
  if (!Util.isUnset(request.instanceIds)) {
    query['InstanceIds'] = request.instanceIds;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InstallAgent',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/ecss/install_agent`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Uses the Cloud Assistant provided by Elastic Compute Service (ECS) to install Enterprise Distributed Application Service (EDAS) Agent and imports ECS instances to EDAS.
 *
 * @description If you call this operation to import an ECS instance into EDAS, the operating system of the ECS instance is not reinstalled. We recommend that you call this operation to import ECS instances into EDAS.
 *
 * @param request InstallAgentRequest
 * @return InstallAgentResponse
 */
async function installAgent(request: InstallAgentRequest): InstallAgentResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return installAgentWithOptions(request, headers, runtime);
}

model ListAliyunRegionResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  regionEntityList?: {
    regionEntity?: [ 
    {
      id?: string(name='Id', description='The ID of the region.', example='cn-hangzhou'),
      name?: string(name='Name', description='The name of the region.', example='China East 1 (Hangzhou)'),
    }
  ](name='RegionEntity')
  }(name='RegionEntityList', description='The details of the regions.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
}

model ListAliyunRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAliyunRegionResponseBody(name='body'),
}

/**
 * @summary Queries Alibaba Cloud regions supported by Enterprise Distributed Application Service (EDAS).
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAliyunRegionResponse
 */
async function listAliyunRegionWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListAliyunRegionResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListAliyunRegion',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/region_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Alibaba Cloud regions supported by Enterprise Distributed Application Service (EDAS).
 *
 * @return ListAliyunRegionResponse
 */
async function listAliyunRegion(): ListAliyunRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listAliyunRegionWithOptions(headers, runtime);
}

model ListApplicationRequest {
  appIds?: string(name='AppIds', description='The application IDs.', example='[
      "5657d271-****-4f03-9bb2-431f942886bb",
      "5657d271-****-4f03-9bb2-431f942bbddd"
]'),
  appName?: string(name='AppName', description='The name of the application. Specify this parameter if you want to filter applications by application name.', example='testapp'),
  clusterId?: string(name='ClusterId', description='The cluster ID. Specify this parameter if you want to filter applications by cluster.', example='c37aec2a-bcca-4ec1-****-************'),
  currentPage?: int32(name='CurrentPage', example='1'),
  logicalRegionId?: string(name='LogicalRegionId', description='The namespace ID. Specify this parameter if you want to filter applications by namespace.', example='cn-beijing:test'),
  logicalRegionIdFilter?: string(name='LogicalRegionIdFilter', description='The ID of the namespace that you use in the exact search to filter applications.', example='cn-beijing:test'),
  pageSize?: int32(name='PageSize', example='20'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group. Specify this parameter if you want to filter applications by resource group.', example='rg-aek24j4s4b*****'),
}

model ListApplicationResponseBody = {
  applicationList?: {
    application?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='00ee517d-dd7d-4d4e-****-************'),
      applicationType?: string(name='ApplicationType', description='The deployment type of the application. Valid values:

*   War: The application is deployed by using a WAR package.
*   FatJar: The application is deployed by using a JAR package.
*   Image: The application is deployed by using an image.
*   If this parameter is empty, the application is not deployed.', example='FatJar'),
      buildPackageId?: long(name='BuildPackageId', description='The build package number of Enterprise Distributed Application Service (EDAS) Container.', example='58'),
      clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='c37aec2a-bcca-4ec1-****-************'),
      clusterType?: int32(name='ClusterType', description='The type of the cluster in which the application is deployed. Valid values:

*   **2**: Elastic Compute Service (ECS) cluster
*   **3**: self-managed Kubernetes cluster in EDAS
*   **5**: Container Service for Kubernetes (ACK) cluster', example='2'),
      createTime?: long(name='CreateTime', description='The time when the application was created.', example='1664208000000'),
      extSlbIp?: string(name='ExtSlbIp', description='The IP address of the Internet-facing SLB instance.', example='100.100.70.***'),
      extSlbListenerPort?: int32(name='ExtSlbListenerPort', description='The listener port of the Internet-facing SLB instance.', example='8080'),
      instances?: int32(name='Instances', description='The number of application instances.', example='5'),
      k8sNamespace?: string(name='K8sNamespace', description='The namespace of the Kubernetes cluster.', example='default'),
      name?: string(name='Name', description='The name of the application.', example='doc-test-consumer'),
      namespaceId?: string(name='NamespaceId', description='The ID of the microservices namespace.', example='cn-hangzhou:test'),
      port?: int32(name='Port', description='The service port of the application.', example='8080'),
      regionId?: string(name='RegionId', description='The region ID of the application.', example='cn-beijing:docTes'),
      resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-aek24j4s4b*****'),
      runningInstanceCount?: int32(name='RunningInstanceCount', description='The number of running application instances.', example='0'),
      slbIp?: string(name='SlbIp', description='The IP address of the internal-facing Server Load Balancer (SLB) instance.', example='192.168.0.***'),
      slbListenerPort?: int32(name='SlbListenerPort', description='The listener port of the internal-facing SLB instance.', example='8088'),
      slbPort?: int32(name='SlbPort', description='The port of the internal-facing SLB instance.', example='80'),
      state?: string(name='State', description='The state of the application. Valid values:

*   RUNNING: The application is running.
*   STOPPED: The application is stopped.
*   DEPLOYING: The application is being deployed.
*   DELETING: The application is being deleted.', example='RUNNING'),
    }
  ](name='Application')
  }(name='ApplicationList', description='The information about applications.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The request ID.', example='5d6fa0bc-cc3**********'),
}

model ListApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApplicationResponseBody(name='body'),
}

/**
 * @summary Queries a list of applications.
 *
 * @param request ListApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApplicationResponse
 */
async function listApplicationWithOptions(request: ListApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }
  if (!Util.isUnset(request.logicalRegionIdFilter)) {
    query['LogicalRegionIdFilter'] = request.logicalRegionIdFilter;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/app_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries a list of applications.
 *
 * @param request ListApplicationRequest
 * @return ListApplicationResponse
 */
async function listApplication(request: ListApplicationRequest): ListApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listApplicationWithOptions(request, headers, runtime);
}

model ListApplicationEcuRequest {
  appId?: string(name='AppId', description='The ID of the application whose ECUs you want to query. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='e809****-43d7-4c6b-8e01-b0d9d1db****'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the microservices namespace.', example='cn-hangzhou:***wei'),
}

model ListApplicationEcuResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  ecuInfoList?: {
    ecuEntity?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='e809****-43d7-4c6b-8e01-b0d9d1db****'),
      availableCpu?: int32(name='AvailableCpu', description='The number of available CPU cores.', example='1'),
      availableMem?: int32(name='AvailableMem', description='The size of available memory. Unit: MB.', example='200'),
      cpu?: int32(name='Cpu', description='The total number of CPU cores.', example='1'),
      createTime?: long(name='CreateTime', description='The time when the ECU was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1542692376066'),
      dockerEnv?: boolean(name='DockerEnv', description='Indicates whether Docker is installed. Valid values:

*   true: Docker is installed.
*   false: Docker is not installed.', example='true'),
      ecuId?: string(name='EcuId', description='The unique ID of the ECU. To query the ID, you can run the `dmidecode` command on the ECS instance that corresponds to the ECU.', example='0de2ebdb-9490-4fc4-be41***************'),
      heartbeatTime?: long(name='HeartbeatTime', description='The time when the last heartbeat detection was performed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281040819'),
      instanceId?: string(name='InstanceId', description='The ID of the Elastic Compute Service (ECS) instance.', example='i-2zej4i2jdf*********'),
      ipAddr?: string(name='IpAddr', description='The internal IP address allocated to the ECU.', example='192.168.XXX.XXX'),
      mem?: int32(name='Mem', description='The total size of memory. Unit: MB.', example='500'),
      name?: string(name='Name', description='The name of the ECU.', example='test'),
      online?: boolean(name='Online', description='Indicates whether the ECU is online. Valid values:

*   true: The ECU is online.
*   false: The ECU is offline.', example='true'),
      regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
      updateTime?: long(name='UpdateTime', description='The time when the ECU was updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1599803995894'),
      userId?: string(name='UserId', description='The ID of the Alibaba Cloud account to which the ECU belongs.', example='****_common_****@aliyun.com'),
      vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC).', example='vpc-2zef6ob8**********'),
      zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-beijing-h'),
    }
  ](name='EcuEntity')
  }(name='EcuInfoList', description='The information about ECUs.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
}

model ListApplicationEcuResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApplicationEcuResponseBody(name='body'),
}

/**
 * @summary Queries elastic compute units (ECUs).
 *
 * @param request ListApplicationEcuRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApplicationEcuResponse
 */
async function listApplicationEcuWithOptions(request: ListApplicationEcuRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListApplicationEcuResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApplicationEcu',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/ecu_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries elastic compute units (ECUs).
 *
 * @param request ListApplicationEcuRequest
 * @return ListApplicationEcuResponse
 */
async function listApplicationEcu(request: ListApplicationEcuRequest): ListApplicationEcuResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listApplicationEcuWithOptions(request, headers, runtime);
}

model ListAuthorityResponseBody = {
  authorityList?: {
    authority?: [ 
    {
      actionList?: {
        action?: [ 
        {
          code?: string(name='Code', description='The code of the permission.', example='1'),
          description?: string(name='Description', description='The description of the permission.', example='Create an application'),
          groupId?: string(name='GroupId', description='The ID of the permission group.', example='1'),
          name?: string(name='Name', description='The name of the permission.', example='Create an application'),
        }
      ](name='Action')
      }(name='ActionList', description='The set of permissions.'),
      description?: string(name='Description', description='The description of the permission group.', example='Operations on applications'),
      groupId?: string(name='GroupId', description='The ID of the permission group.', example='1'),
      name?: string(name='Name', description='The name of the permission group.', example='Application management'),
    }
  ](name='Authority')
  }(name='AuthorityList', description='The permissions.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57609587-DFA2-41EC-****-*********'),
}

model ListAuthorityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAuthorityResponseBody(name='body'),
}

/**
 * @summary Queries all permissions.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAuthorityResponse
 */
async function listAuthorityWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListAuthorityResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListAuthority',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/authority_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries all permissions.
 *
 * @return ListAuthorityResponse
 */
async function listAuthority(): ListAuthorityResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listAuthorityWithOptions(headers, runtime);
}

model ListBuildPackResponseBody = {
  buildPackList?: {
    buildPack?: [ 
    {
      configId?: long(name='ConfigId', description='The build package number of EDAS Container.', example='57'),
      disabled?: boolean(name='Disabled', description='Indicates whether the EDAS Container version is disabled. A disabled version cannot be configured for use.', example='false'),
      feature?: string(name='Feature', description='The features of the EDAS Container version, which are released for public preview.', example='“”'),
      imageId?: string(name='ImageId', description='The ID of the base image that corresponds to EDAS Container.', example='registry.aliyuncs.com/ed**/****-*********:*.*.*'),
      multipleTenant?: boolean(name='MultipleTenant', description='Indicates whether EDAS Container supports multitenancy.', example='true'),
      packVersion?: string(name='PackVersion', description='The version of the application.', example='3.5.6'),
      pandoraDesc?: string(name='PandoraDesc', description='The description of the Pandora container.', example='test'),
      pandoraDownloadUrl?: string(name='PandoraDownloadUrl', description='The download URL of the Pandora installer.', example='http://edas.oss-cn-hangzhou.aliyuncs.com/edas-plugins/edas.sar.V3.5.6/taobao-hsf.tgz'),
      pandoraVersion?: string(name='PandoraVersion', description='The version of the Pandora container.', example='edas.public.sar.V3.5.6'),
      pluginInfo?: string(name='PluginInfo', description='The description of the plug-in.', example='1'),
      scriptName?: string(name='ScriptName', description='The name of the Shell script that runs EDAS Container.', example='default'),
      scriptVersion?: string(name='ScriptVersion', description='The version of the Shell script that runs EDAS Container.', example='1.0.3'),
      supportFeatures?: string(name='SupportFeatures', description='The features supported by EDAS Container.', example='tengine,fatjar,restful,eip_nodeport,dpath'),
      tengineDownloadUrl?: string(name='TengineDownloadUrl', description='The download URL of the Tengine installer.', example='http://edas.oss-cn-hangzhou.aliyuncs.com/components/tengine/3.4.7/tengine.sh'),
      tengineImageId?: string(name='TengineImageId', description='The ID of the Tengine image that corresponds to EDAS Container.', example='registry.aliyuncs.com/edas/****-*********-*****:*.*.*'),
      tomcatDesc?: string(name='TomcatDesc', description='The description of the Tomcat container.', example='1\\\\. The config-client plug-in is updated. The issue of unread cache in multitenancy scenarios is fixed. 2. The High-Speed Service Framework (HSF) plug-in is updated to fix the issue that the qos command of the Pandora container cannot be executed and the issue that the service address cannot be found if the HSF plug-in subscribes to an excessive number of services. 3. The Fastjson package is updated to the sec06 secure version in all plug-ins that use this package.'),
      tomcatDownloadUrl?: string(name='TomcatDownloadUrl', description='The download URL of the Tomcat installer.', example='http://edas.oss-cn-hangzhou.aliyuncs.com/edas-container/7.0.92/taobao-tomcat-production-7.0.92.tar.gz'),
      tomcatPath?: string(name='TomcatPath', description='The directory of the Tomcat container.', example='taobao-tomcat-production-7.0.59.3'),
      tomcatVersion?: string(name='TomcatVersion', description='The version of the Tomcat container.', example='8.5.63'),
      withTengine?: boolean(name='WithTengine', description='Indicates whether EDAS Container supports traffic management.', example='true'),
    }
  ](name='BuildPack')
  }(name='BuildPackList', description='The returned versions of EDAS Container.'),
  code?: int32(name='Code', description='code', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4FD4-*************'),
}

model ListBuildPackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListBuildPackResponseBody(name='body'),
}

/**
 * @summary Queries Enterprise Distributed Application Service (EDAS) Container versions.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListBuildPackResponse
 */
async function listBuildPackWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListBuildPackResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListBuildPack',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/build_pack_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Enterprise Distributed Application Service (EDAS) Container versions.
 *
 * @return ListBuildPackResponse
 */
async function listBuildPack(): ListBuildPackResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listBuildPackWithOptions(headers, runtime);
}

model ListClusterRequest {
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the namespace. You can call the ListUserDefineRegion operation to query the namespace ID. For more information, see [ListUserDefineRegion](https://help.aliyun.com/document_detail/149377.html).

*   If this parameter is left empty, the clusters in the default namespace are queried.
*   If this parameter is specified, the clusters in the specified namespace are queried.', example='cn-beijing:test'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group. You can call the ListResourceGroup operation to query the resource group ID. For more information, see [ListResourceGroup](https://help.aliyun.com/document_detail/62055.html).

*   If this parameter is left empty, the clusters in the default resource group are queried.
*   If this parameter is specified, the clusters in the specified resource group are queried.', example='461'),
}

model ListClusterResponseBody = {
  clusterList?: {
    cluster?: [ 
    {
      clusterId?: string(name='ClusterId', description='The ID of the cluster in EDAS.', example='b98b5919-c111-4dad-9f74-7233********'),
      clusterName?: string(name='ClusterName', description='The name of the cluster.', example='cluster-test'),
      clusterType?: int32(name='ClusterType', description='The type of the cluster. Valid values:

*   0: regular Docker cluster
*   1: Swarm cluster
*   2: Elastic Compute Service (ECS) cluster
*   3: self-managed Kubernetes cluster in Enterprise Distributed Application Service (EDAS)
*   4: cluster in which Pandora automatically registers applications
*   5: ACK cluster', example='2'),
      cpu?: int32(name='Cpu', description='The total number of CPU cores.', example='2'),
      cpuUsed?: int32(name='CpuUsed', description='The number of used CPU cores.', example='1'),
      createTime?: long(name='CreateTime', description='The timestamp when the cluster was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1502888064561'),
      csClusterId?: string(name='CsClusterId', description='The ID of the cluster in Container Service for Kubernetes (ACK).', example='c2ce************b9203a9'),
      description?: string(name='Description', description='The description of the cluster.', example='Test'),
      iaasProvider?: string(name='IaasProvider', description='The provider of the cluster.', example='ALIYUN'),
      mem?: int32(name='Mem', description='The total size of memory. Unit: MB.', example='3072'),
      memUsed?: int32(name='MemUsed', description='The size of used memory. Unit: MB.', example='200'),
      networkMode?: int32(name='NetworkMode', description='The network type of the cluster. Valid values:

*   1: classic network
*   2: virtual private cloud (VPC)', example='1'),
      nodeNum?: int32(name='NodeNum', description='The number of instances.', example='2'),
      oversoldFactor?: int32(name='OversoldFactor', description='The CPU overcommit ratio that is supported by a Docker cluster. Valid values:

*   1: 1:1, which means that CPU resources are not overcommitted.
*   2: 1:2, which means that CPU resources are overcommitted by 1:2.
*   4: 1:4, which means that CPU resources are overcommitted by 1:4.
*   8: 1:8, which means that CPU resources are overcommitted by 1:8.', example='1'),
      regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
      resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='461'),
      updateTime?: long(name='UpdateTime', description='The timestamp when the cluster was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1533820823203'),
      vpcId?: string(name='VpcId', description='VPC ID', example='vpc-23727****'),
    }
  ](name='Cluster')
  }(name='ClusterList', description='The clusters.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='1053-08e4-47a5-b2ab-5c0323de****'),
}

model ListClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClusterResponseBody(name='body'),
}

/**
 * @summary Queries clusters.
 *
 * @param request ListClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClusterResponse
 */
async function listClusterWithOptions(request: ListClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListClusterResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCluster',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/cluster_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries clusters.
 *
 * @param request ListClusterRequest
 * @return ListClusterResponse
 */
async function listCluster(request: ListClusterRequest): ListClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listClusterWithOptions(request, headers, runtime);
}

model ListClusterMembersRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster. You can call the ListCluster operation to query the cluster ID. For more information, see [ListCluster](https://help.aliyun.com/document_detail/154995.html).

This parameter is required.', example='52984524-6d48-4bbd-85f2-a34b0e5b****'),
  currentPage?: int32(name='CurrentPage', description='The number of the page to return. If you do not specify this parameter, the first page is returned.', example='1'),
  ecsList?: string(name='EcsList', description='The number of ECS instances.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of ECS instances to return on each page. If you do not specify this parameter, all ECS instances in the specified cluster are returned on one page.', example='50'),
}

model ListClusterMembersResponseBody = {
  clusterMemberPage?: {
    clusterMemberList?: {
      clusterMember?: [ 
      {
        clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='52984524-6d48-4bbd-85f2-a34b0e5b****'),
        clusterMemberId?: string(name='ClusterMemberId', description='The ID of the ECS instance in the cluster.', example='adb03eeb-3adf-4d7e-afe1-03d1ad45****'),
        createTime?: long(name='CreateTime', description='The timestamp when the ECS instance was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281038175'),
        ecsId?: string(name='EcsId', description='The ID of the ECS instance.', example='i-2zej4i2jdf3ntwhj****'),
        ecuId?: string(name='EcuId', description='The unique ID of the elastic compute unit (ECU). You can run the `dmidecode` command on the ECS instance to query the ECU ID.', example='70ed3f59-b476-49aa-be09-9e6c375d****'),
        privateIp?: string(name='PrivateIp', description='The private IP address for the ECS instance.', example='172.16.XX.XX'),
        status?: int32(name='Status', description='The state of the ECS instance. Valid values:

*   1: The instance is running.
*   0: The instance is being converted.
*   \\\\-1: The instance fails to be converted.
*   \\\\-2: The instance is offline.', example='1'),
        updateTime?: long(name='UpdateTime', description='The timestamp when the ECS instance was updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573281041113'),
      }
    ](name='ClusterMember')
    }(name='ClusterMemberList', description='The list of ECS instances in the cluster.'),
    currentPage?: int32(name='CurrentPage', description='The page number of the returned page. If this parameter is not returned, the first page is returned.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of ECS instances returned per page.', example='10'),
    totalSize?: int32(name='TotalSize', description='The total number of pages returned when all ECS instances are returned based on the specified PageSize parameter.', example='5'),
  }(name='ClusterMemberPage', description='The information about the ECS instances in the cluster.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
}

model ListClusterMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClusterMembersResponseBody(name='body'),
}

/**
 * @summary Queries Elastic Compute Service (ECS) instances in a cluster.
 *
 * @param request ListClusterMembersRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClusterMembersResponse
 */
async function listClusterMembersWithOptions(request: ListClusterMembersRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListClusterMembersResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.ecsList)) {
    query['EcsList'] = request.ecsList;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterMembers',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/cluster_member_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Elastic Compute Service (ECS) instances in a cluster.
 *
 * @param request ListClusterMembersRequest
 * @return ListClusterMembersResponse
 */
async function listClusterMembers(request: ListClusterMembersRequest): ListClusterMembersResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listClusterMembersWithOptions(request, headers, runtime);
}

model ListComponentsResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  componentList?: {
    component?: [ 
    {
      componentId?: string(name='ComponentId', description='The ID of the component.', example='1'),
      componentKey?: string(name='ComponentKey', description='The key of the component.', example='JDK 7'),
      desc?: string(name='Desc', description='The description of the component.', example='JDK 7'),
      expired?: boolean(name='Expired', description='Indicates whether the component has expired. Valid values:

*   false: The component has not expired.
*   true: The component has expired.', example='false'),
      type?: string(name='Type', description='The type of the component. Valid values:

*   JDK
*   TOMCAT
*   TENGINE', example='JDK'),
      version?: string(name='Version', description='The version of the component.', example='oraclejdk7'),
    }
  ](name='Component')
  }(name='ComponentList', description='The components.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
}

model ListComponentsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListComponentsResponseBody(name='body'),
}

/**
 * @summary Queries the components that are related to applications in Elastic Compute Service (ECS) clusters.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListComponentsResponse
 */
async function listComponentsWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListComponentsResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListComponents',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/components`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the components that are related to applications in Elastic Compute Service (ECS) clusters.
 *
 * @return ListComponentsResponse
 */
async function listComponents(): ListComponentsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listComponentsWithOptions(headers, runtime);
}

model ListConfigTemplatesRequest {
  currentPage?: long(name='CurrentPage', description='The number of the page to return. Pages start from Page 1.', example='1'),
  id?: long(name='Id', description='The ID of the configuration template.', example='3d84efaf-37d9-49fb-a3a8-b38d5c******'),
  name?: string(name='Name', description='The name of the configuration template.', example='config-tmpl-1'),
  pageSize?: long(name='PageSize', description='The number of entries to return on each page.', example='10'),
}

model ListConfigTemplatesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
    result?: [ 
      {
        content?: string(name='Content', description='The content of the configuration template.', example='{"name":"William"}'),
        description?: string(name='Description', description='The description of the configuration template.', example='Test configuration template'),
        format?: string(name='Format', description='The data format of the configuration template.', example='JSON'),
        gmtCreate?: long(name='GmtCreate', description='The time when the configuration template was created.', example='1638171689626'),
        gmtModified?: long(name='GmtModified', description='The time when the configuration template was updated.', example='1638171689626'),
        id?: string(name='Id', description='The ID of the configuration template.', example='3d84efaf-37d9-49fb-a3a8-b38d5c2b460c'),
        name?: string(name='Name', description='The name of the configuration template.', example='config-tmpl-1'),
      }
    ](name='Result', description='The configuration templates.'),
    totalSize?: long(name='TotalSize', description='The total number of configuration templates.', example='100'),
  }(name='Data', description='The result of the request.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4D9F-DR94-FD****************'),
}

model ListConfigTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListConfigTemplatesResponseBody(name='body'),
}

/**
 * @summary Queries configuration templates.
 *
 * @param request ListConfigTemplatesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListConfigTemplatesResponse
 */
async function listConfigTemplatesWithOptions(request: ListConfigTemplatesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListConfigTemplatesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListConfigTemplates',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/config_template`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries configuration templates.
 *
 * @param request ListConfigTemplatesRequest
 * @return ListConfigTemplatesResponse
 */
async function listConfigTemplates(request: ListConfigTemplatesRequest): ListConfigTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listConfigTemplatesWithOptions(request, headers, runtime);
}

model ListConsumedServicesRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='a66c5d1f-****-****-8c2b-6925f781b203'),
}

model ListConsumedServicesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  consumedServicesList?: {
    listConsumedServices?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
      dockerApplication?: boolean(name='DockerApplication', description='Indicates whether the application runs in a Docker container. Valid values:

*   true: The application runs in a Docker container.
*   false: The application does not run in a Docker container.', example='true'),
      group2Ip?: string(name='Group2Ip', description='A reserved parameter.', example='""'),
      groups?: {
        group?: [ string ](name='group')
      }(name='Groups'),
      ips?: {
        ip?: [ string ](name='ip')
      }(name='Ips'),
      name?: string(name='Name', description='The name of the consumed service.', example='service'),
      type?: string(name='Type', description='The type of the consumed service.', example='HSF'),
      version?: string(name='Version', description='The version of the consumed service.', example='1.0'),
    }
  ](name='ListConsumedServices')
  }(name='ConsumedServicesList', description='The information about consumed services.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
}

model ListConsumedServicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListConsumedServicesResponseBody(name='body'),
}

/**
 * @summary Queries the services that are consumed by an application.
 *
 * @param request ListConsumedServicesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListConsumedServicesResponse
 */
async function listConsumedServicesWithOptions(request: ListConsumedServicesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListConsumedServicesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListConsumedServices',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/service/listConsumedServices`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the services that are consumed by an application.
 *
 * @param request ListConsumedServicesRequest
 * @return ListConsumedServicesResponse
 */
async function listConsumedServices(request: ListConsumedServicesRequest): ListConsumedServicesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listConsumedServicesWithOptions(request, headers, runtime);
}

model ListConvertableEcuRequest {
  clusterId?: string(name='clusterId', description='The ID of the cluster. You can call the ListCluster operation to query the cluster ID. For more information, see [ListCluster](https://help.aliyun.com/document_detail/154995.html).

This parameter is required.', example='b3e3f77b-462e-****-****-bec8727a****'),
}

model ListConvertableEcuResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  instanceList?: {
    instance?: [ 
    {
      cpu?: int32(name='Cpu', description='The number of CPU cores of the ECS instance.', example='2'),
      ecuId?: string(name='EcuId', description='The ID of the elastic compute units (ECU).', example='b197-40ab-9155-7ca7'),
      eip?: string(name='Eip', description='The elastic IP address (EIP) associated with the ECS instance. The EIP can be changed.', example='13.xx.xxx.xx'),
      expired?: boolean(name='Expired', description='Indicates whether the ECS instance has expired.', example='false'),
      innerIp?: string(name='InnerIp', description='The private IP address of the ECS instance. This parameter is valid only when the ECS instance is deployed in a VPC.', example='192.168.13.xx'),
      instanceId?: string(name='InstanceId', description='The ID of the ECS instance.', example='i-2ze7s2v0b***********'),
      instanceName?: string(name='InstanceName', description='The name of the ECS instance.', example='worker-k8s'),
      mem?: int32(name='Mem', description='The size of memory for the ECS instance.', example='4096'),
      privateIp?: string(name='PrivateIp', description='The private IP address of the ECS instance. This parameter is valid only when the ECS instance is deployed in a VPC.', example='192.XX.XX.123'),
      publicIp?: string(name='PublicIp', description='The public IP address of the ECS instance. This IP address can be used only by the ECS instance.', example='13.xx.xx.xxx'),
      regionId?: string(name='RegionId', description='The ID of the region where the ECS instance is located.', example='cn-beijing'),
      status?: string(name='Status', description='The state of the instance. Valid values:

*   Pending: The instance is being created.
*   Running: The instance is running.
*   Starting: The instance is being started.
*   Stopping: The instance is being stopped.
*   Stopped: The instance is stopped.', example='Running'),
      vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC).', example='vpc-2zef6ob8m************'),
      vpcName?: string(name='VpcName', description='The name of the VPC.', example='jianwei-test'),
    }
  ](name='Instance')
  }(name='InstanceList', description='The ECS instances that can be imported to the cluster.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
}

model ListConvertableEcuResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListConvertableEcuResponseBody(name='body'),
}

/**
 * @summary Queries the Elastic Compute Service (ECS) instances that can be imported to a specified cluster. This operation is applicable to ECS clusters.
 *
 * @param request ListConvertableEcuRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListConvertableEcuResponse
 */
async function listConvertableEcuWithOptions(request: ListConvertableEcuRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListConvertableEcuResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['clusterId'] = request.clusterId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListConvertableEcu',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/convertable_ecu_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the Elastic Compute Service (ECS) instances that can be imported to a specified cluster. This operation is applicable to ECS clusters.
 *
 * @param request ListConvertableEcuRequest
 * @return ListConvertableEcuResponse
 */
async function listConvertableEcu(request: ListConvertableEcuRequest): ListConvertableEcuResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listConvertableEcuWithOptions(request, headers, runtime);
}

model ListDeployGroupRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-4f92-4413-****-************'),
}

model ListDeployGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  deployGroupList?: {
    deployGroup?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='3616cdca-4f92-4413-****-************'),
      appVersionId?: string(name='AppVersionId', description='The ID of the change process for application deployment in the instance group.', example='changeorder_a**_*******_**'),
      baseComponentMetaName?: string(name='BaseComponentMetaName', description='The name of the basic component.', example='k8s-sc-consumer-****'),
      clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='0d247b93-8d62-4e34-****-************'),
      clusterName?: string(name='ClusterName', description='The name of the cluster.', example='doc-test'),
      cpuLimit?: string(name='CpuLimit', description='The maximum number of CPU cores allowed for each application instance when the application is running.', example='400'),
      cpuRequest?: string(name='CpuRequest', description='The number of CPU cores requested for each application instance when the application is running. Unit: cores. Value 0 indicates that no limit is set on CPU cores.', example='1'),
      createTime?: long(name='CreateTime', description='The time when the application was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573627695779'),
      csClusterId?: string(name='CsClusterId', description='The ID of the Container Service for Kubernetes (ACK) cluster.', example='c66e65950db****cba92f17434df1****'),
      deploymentName?: string(name='DeploymentName', description='The name of the deployment.', example='test'),
      env?: string(name='Env', description='The ID of the ACK cluster.', example='497806cb-****-6a7'),
      ephemeralStorageLimit?: string(name='EphemeralStorageLimit', description='The maximum size of space required by ephemeral storage. Unit: GB. Value 0 indicates that no limit is set on the space size.', example='8'),
      ephemeralStorageRequest?: string(name='EphemeralStorageRequest', description='The minimum size of space required by ephemeral storage. Unit: GB. Value 0 indicates that no limit is set on the space size.', example='4'),
      groupId?: string(name='GroupId', description='The ID of the instance group.', example='577f4c50-16ee-43d8-****-************'),
      groupName?: string(name='GroupName', description='The name of the instance group.', example='_DEFAULT_GROUP'),
      groupType?: int32(name='GroupType', description='The type of the instance group. Valid values:

*   0: default group.
*   1: Canary release is disabled for traffic management.
*   2: Canary release is enabled for traffic management.', example='1'),
      labels?: string(name='Labels', description='The tag.', example='test'),
      lastUpdateTime?: long(name='LastUpdateTime', description='The time when the application was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1587888503825'),
      memoryLimit?: string(name='MemoryLimit', description='The maximum size of memory allowed for each application instance when the application is running. Unit: MB. Value 0 indicates that no limit is set on the memory size.', example='0'),
      memoryRequest?: string(name='MemoryRequest', description='The size of memory requested for each application instance when the application is running. Unit: MB. Value 0 indicates that no limit is set on the memory size.', example='512'),
      nameSpace?: string(name='NameSpace', description='The namespace.', example='ping****est'),
      packagePublicUrl?: string(name='PackagePublicUrl', description='The external download URL of the deployment package.', example='http://****.oss-cn-shanghai.aliyuncs.com/****/sc-****-consumer-E.jar'),
      packageUrl?: string(name='PackageUrl', description='The URL of the deployment package.', example='http://****.oss-cn-shanghai.aliyuncs.com/****/sc-****-consumer-E.jar'),
      packageVersion?: string(name='PackageVersion', description='The version of the deployment package.', example='E'),
      packageVersionId?: string(name='PackageVersionId', description='The version of the deployment package that was used to deploy an application in the instance group.', example='a7d48fe8-ad8f-****-89bd-74cc1ee6****'),
      postStart?: string(name='PostStart', description='The post-start script.', example='{\\\\"exec\\\\":{\\\\"command\\\\":[\\\\"ls\\\\",\\\\"/\\\\"]}}"'),
      preStop?: string(name='PreStop', description='The pre-stop script.', example='{\\\\"exec\\\\":{\\\\"command\\\\":[\\\\"ls\\\\",\\\\"/\\\\"]}}"'),
      reversion?: string(name='Reversion', description='The version of the application. The value progressively increases in the range of 0 to 7.', example='2'),
      selector?: string(name='Selector', description='The ID of the application deployed in the ACK cluster in Enterprise Distributed Application Service (EDAS).', example='53dd85cc-25b4-4d0e-****-6bf5465****4'),
      status?: string(name='Status', description='The state of the application instance group. Valid values:

*   0: ready
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   10: failed due to a system exception', example='2'),
      strategy?: string(name='Strategy', description='The throttling policy. This parameter is reserved.', example='RollingUpdate'),
      updateTime?: long(name='UpdateTime', description='The time when the application was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573627695779'),
      VExtServerGroupId?: string(name='VExtServerGroupId', description='The ID of the vServer group of the Internet-facing SLB instance associated with the instance group.', example='rsp-cige6******'),
      VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group of the internal-facing Server Load Balancer (SLB) instance associated with the instance group.', example='rsp-cige6******'),
    }
  ](name='DeployGroup')
  }(name='DeployGroupList', description='The information about the instance group in which the application is deployed.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='3FDE-DS9R-*********************'),
}

model ListDeployGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDeployGroupResponseBody(name='body'),
}

/**
 * @summary Queries the instance groups to which an application is deployed.
 *
 * @param request ListDeployGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDeployGroupResponse
 */
async function listDeployGroupWithOptions(request: ListDeployGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListDeployGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeployGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/deploy_group_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the instance groups to which an application is deployed.
 *
 * @param request ListDeployGroupRequest
 * @return ListDeployGroupResponse
 */
async function listDeployGroup(request: ListDeployGroupRequest): ListDeployGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listDeployGroupWithOptions(request, headers, runtime);
}

model ListEcsNotInClusterRequest {
  networkMode?: int32(name='NetworkMode', description='The network type. Valid values:

*   1: classic network
*   2: virtual private cloud (VPC)

This parameter is required.', example='2'),
  vpcId?: string(name='VpcId', description='The ID of the VPC. This parameter is required if the NetworkMode parameter is set to 2.', example='vpc-2zef6ob8****v8x3q46kp'),
}

model ListEcsNotInClusterResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  ecsEntityList?: {
    ecsEntity?: [ 
    {
      cpu?: int32(name='Cpu', description='The number of CPU cores.', example='2'),
      eip?: string(name='Eip', description='The elastic IP address (EIP) associated with the ECS instance.', example='139.30.xxx.xx'),
      expired?: boolean(name='Expired', description='Indicates whether the ECS instance has expired. Valid values:

*   **true**: The ECS instance has expired.
*   **false**: The ECS instance has not expired.', example='false'),
      innerIp?: string(name='InnerIp', description='The private IP address of the ECS instance.', example='192.168.20.113'),
      instanceId?: string(name='InstanceId', description='The ID of the ECS instance.', example='i-2ze7s2v0b***********'),
      instanceName?: string(name='InstanceName', description='The name of the ECS instance.', example='worker-k8s-for-cs-c9dfa009a5e7c4faab2010b87cae4****'),
      mem?: int32(name='Mem', description='The size of memory. Unit: bytes.', example='4096'),
      privateIp?: string(name='PrivateIp', description='The private IP address of the ECS instance.', example='192.168.*.**'),
      publicIp?: string(name='PublicIp', description='The public IP address of the ECS instance.', example='131.30.xxx.xx'),
      regionId?: string(name='RegionId', description='The ID of the region where the ECS instance is located.', example='cn-beijing'),
      status?: string(name='Status', description='The status of the ECS instance. Valid values:

*   **Pending**: The ECS instance is being created.
*   **Running**: The ECS instance is running.
*   **Starting**: The ECS instance is being started.
*   **Stopping**: The ECS instance is being stopped.
*   **Stopped**: The ECS instance is stopped.', example='Running'),
      vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-2zef6ob8mrlzv8x3q****'),
      vpcName?: string(name='VpcName', description='The name of the VPC.', example='test'),
    }
  ](name='EcsEntity')
  }(name='EcsEntityList', description='The information about ECS instances.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
}

model ListEcsNotInClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListEcsNotInClusterResponseBody(name='body'),
}

/**
 * @summary Queries all Elastic Compute Service (ECS) instances that have not been imported to clusters.
 *
 * @param request ListEcsNotInClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListEcsNotInClusterResponse
 */
async function listEcsNotInClusterWithOptions(request: ListEcsNotInClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListEcsNotInClusterResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.networkMode)) {
    query['NetworkMode'] = request.networkMode;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListEcsNotInCluster',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/ecs_not_in_cluster`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries all Elastic Compute Service (ECS) instances that have not been imported to clusters.
 *
 * @param request ListEcsNotInClusterRequest
 * @return ListEcsNotInClusterResponse
 */
async function listEcsNotInCluster(request: ListEcsNotInClusterRequest): ListEcsNotInClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listEcsNotInClusterWithOptions(request, headers, runtime);
}

model ListEcuByRegionRequest {
  act?: string(name='Act', description='Set the value to `pop-query`.

This parameter is required.', example='pop-query'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the namespace.

*   The ID of a custom namespace is in the `region ID:namespace identifier` format. Example: cn-beijing:tdy218.
*   The ID of the default namespace is in the `region ID` format. Example: cn-beijing.', example='cn-beijing or cn-beijing:tdy218'),
}

model ListEcuByRegionResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  ecuEntityList?: {
    ecuEntity?: [ 
    {
      availableCpu?: int32(name='AvailableCpu', description='The number of available CPU cores for the ECU.', example='4'),
      availableMem?: int32(name='AvailableMem', description='The size of available memory for the ECU. Unit: MB.', example='8192'),
      cpu?: int32(name='Cpu', description='The total number of CPU cores.', example='0'),
      createTime?: long(name='CreateTime', description='The timestamp when the ECU was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1572539283168'),
      dockerEnv?: boolean(name='DockerEnv', description='Indicates whether Docker is installed. Valid values:

*   true: Docker is installed.
*   false: Docker is not installed.', example='true'),
      ecuId?: string(name='EcuId', description='The unique ID of the ECU. To query the ID, you can run the `dmidecode` command on the ECS instance that corresponds to the ECU.', example='c96c494c-1b91-4456-bbb3-b5afcd16****'),
      heartbeatTime?: long(name='HeartbeatTime', description='The timestamp when the last heartbeat detection was performed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1572867865221'),
      instanceId?: string(name='InstanceId', description='The ID of the ECU.', example='i-2ze82h8f4zcn449y****'),
      ipAddr?: string(name='IpAddr', description='The private IP address of the ECU.', example='192.168.xxx.xxx'),
      mem?: int32(name='Mem', description='The total size of memory. Unit: MB.', example='0'),
      name?: string(name='Name', description='The name of the ECU.', example='worker-k8s-for'),
      online?: boolean(name='Online', description='Indicates whether the ECU is online. Valid values:

*   true: The ECU is online.
*   false: The ECU is offline.', example='false'),
      regionId?: string(name='RegionId', description='The ID of the region in which the ECU resides.', example='cn-beijing'),
      updateTime?: long(name='UpdateTime', description='The timestamp when the ECU was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1572867895575'),
      userId?: string(name='UserId', description='The ID of the Alibaba Cloud account.', example='edas@aliyun-****.com'),
      vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) in which the ECU resides.', example='vpc-2zew8mi6gqbo5wf****'),
      zoneId?: string(name='ZoneId', description='The ID of the zone in which the ECU resides.', example='cn-beijing-a'),
    }
  ](name='EcuEntity')
  }(name='EcuEntityList', description='The information about ECUs.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='00000000-0000-0000-****'),
}

model ListEcuByRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListEcuByRegionResponseBody(name='body'),
}

/**
 * @summary Queries the available elastic compute units (ECUs) in a specified namespace.
 *
 * @description ## Terms
 * *   **Namespace**: the logical concept that is used to isolate resources such as clusters, ECS instances, and applications, and microservices published in EDAS. This concept involves the default namespace and custom namespaces. Each region has a default namespace and supports multiple custom namespaces. By default, only the default namespace is available. You do not need to create a custom namespace if you do not want to isolate resources and microservices.
 * *   **Elastic compute unit (ECU)**: After an ECS instance is imported to a cluster, the instance becomes an ECU.
 * *   **Elastic compute container (ECC)**: After you deploy an application to an ECU in a cluster, the ECU becomes an ECC.
 *
 * @param request ListEcuByRegionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListEcuByRegionResponse
 */
async function listEcuByRegionWithOptions(request: ListEcuByRegionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListEcuByRegionResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.act)) {
    query['Act'] = request.act;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListEcuByRegion',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/ecu_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the available elastic compute units (ECUs) in a specified namespace.
 *
 * @description ## Terms
 * *   **Namespace**: the logical concept that is used to isolate resources such as clusters, ECS instances, and applications, and microservices published in EDAS. This concept involves the default namespace and custom namespaces. Each region has a default namespace and supports multiple custom namespaces. By default, only the default namespace is available. You do not need to create a custom namespace if you do not want to isolate resources and microservices.
 * *   **Elastic compute unit (ECU)**: After an ECS instance is imported to a cluster, the instance becomes an ECU.
 * *   **Elastic compute container (ECC)**: After you deploy an application to an ECU in a cluster, the ECU becomes an ECC.
 *
 * @param request ListEcuByRegionRequest
 * @return ListEcuByRegionResponse
 */
async function listEcuByRegion(request: ListEcuByRegionRequest): ListEcuByRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listEcuByRegionWithOptions(request, headers, runtime);
}

model ListHistoryDeployVersionRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-4f92-4413-****-************'),
}

model ListHistoryDeployVersionResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  packageVersionList?: {
    packageVersion?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='3616cdca-4f92-4413-****-************'),
      createTime?: long(name='CreateTime', description='The time when the deployment package was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573627440892'),
      description?: string(name='Description', description='The description of the deployment package.', example='deploy'),
      id?: string(name='Id', description='The unique ID of the deployment package.', example='441beb18-da42-44dc-****-************'),
      packageVersion?: string(name='PackageVersion', description='The version of the application that was released by using the deployment package. This version can be used to call the RollbackApplication operation.', example='1.0'),
      publicUrl?: string(name='PublicUrl', description='The URL of the deployment package.', example='http://edas-sz.oss-cn-shenzhen**********/SPRING_CLOUD_PROVIDER.jar'),
      type?: string(name='Type', description='The deployment mode of the application. Valid values:

*   url: The application is deployed by using a JAR or WAR package.
*   image: The application is deployed by using an image.', example='url'),
      updateTime?: long(name='UpdateTime', description='The time when the deployment package was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573627440892'),
      warUrl?: string(name='WarUrl', description='The URL of the deployment package.', example='http://edas-sz.oss-cn-shenzhen**********/SPRING_CLOUD_PROVIDER.jar'),
    }
  ](name='PackageVersion')
  }(name='PackageVersionList', description='The information about historical deployment packages.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-************'),
}

model ListHistoryDeployVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListHistoryDeployVersionResponseBody(name='body'),
}

/**
 * @summary Queries historical deployment packages of an application.
 *
 * @param request ListHistoryDeployVersionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListHistoryDeployVersionResponse
 */
async function listHistoryDeployVersionWithOptions(request: ListHistoryDeployVersionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListHistoryDeployVersionResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListHistoryDeployVersion',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/deploy_history_version_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries historical deployment packages of an application.
 *
 * @param request ListHistoryDeployVersionRequest
 * @return ListHistoryDeployVersionResponse
 */
async function listHistoryDeployVersion(request: ListHistoryDeployVersionRequest): ListHistoryDeployVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listHistoryDeployVersionWithOptions(request, headers, runtime);
}

model ListK8sConfigMapsRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='c0830281-366c-41b6-80fb-542e76******'),
  condition?: map[string]any(name='Condition', description='The filter conditions. Set this parameter to a JSON string in the format of {"field":"Name", "pattern":"configmap-"}.', example='{"field":"Name", "pattern":"configmap-"}'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
  pageNo?: int32(name='PageNo', description='The number of the page to return. Pages start from Page 0.', example='0'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='50'),
  regionId?: string(name='RegionId', description='The ID of the region.', example='cn-hangzhou'),
  showRelatedApps?: boolean(name='ShowRelatedApps', description='Specifies whether to return a list of applications that use a ConfigMap. Valid values: true and false.', example='true'),
}

model ListK8sConfigMapsResponseBody = {
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-****************'),
  result?: {
    configMaps?: [ 
      {
        clusterId?: string(name='ClusterId', description='The ID of the Kubernetes cluster. You can obtain the cluster ID by calling the GetK8sCluster operation. For more information, see [GetK8sCluster](https://help.aliyun.com/document_detail/181437.html).', example='d73918f4-3b08-4c17-bb07-eaf8********'),
        clusterName?: string(name='ClusterName', description='The name of the cluster.', example='my-cluster'),
        creationTime?: string(name='CreationTime', description='The time when the ConfigMaps were created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.', example='2022-01-31T02:46:14Z'),
        data?: [ 
          {
            key?: string(name='Key', description='The user-defined key that is stored in the ConfigMap.', example='name'),
            value?: string(name='Value', description='The user-defined value that is stored in the ConfigMap.', example='william'),
          }
        ](name='Data', description='The information about ConfigMaps.'),
        name?: string(name='Name', description='The name of the ConfigMap.', example='my-config'),
        namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
        relatedApps?: [ 
          {
            appId?: string(name='AppId', description='The ID of the application.', example='728cbdf2-da10-49b8-b69c-9168a********'),
            appName?: string(name='AppName', description='The name of the application.', example='my-app'),
          }
        ](name='RelatedApps', description='The related applications.'),
      }
    ](name='ConfigMaps', description='The information about ConfigMaps.'),
    total?: int32(name='Total', description='The total number of entries that are returned.', example='6'),
  }(name='Result', description='The query results that are returned.'),
}

model ListK8sConfigMapsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListK8sConfigMapsResponseBody(name='body'),
}

/**
 * @summary Queries Kubernetes ConfigMaps.
 *
 * @param request ListK8sConfigMapsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListK8sConfigMapsResponse
 */
async function listK8sConfigMapsWithOptions(request: ListK8sConfigMapsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListK8sConfigMapsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.condition)) {
    query['Condition'] = request.condition;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.showRelatedApps)) {
    query['ShowRelatedApps'] = request.showRelatedApps;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListK8sConfigMaps',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_config_map`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Kubernetes ConfigMaps.
 *
 * @param request ListK8sConfigMapsRequest
 * @return ListK8sConfigMapsResponse
 */
async function listK8sConfigMaps(request: ListK8sConfigMapsRequest): ListK8sConfigMapsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listK8sConfigMapsWithOptions(request, headers, runtime);
}

model ListK8sIngressRulesRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.', example='5b2b4ab4-efbc-4a81-9c45-xxxxxxxxxxxxx'),
  condition?: string(name='Condition', description='The filter conditions. Set the value to a JSON string in the format of {"field":"Name", "pattern":"my-"}, where:

*   field: the parameter to be matched. Valid values: Name and ClusterName.
*   pattern: the content to be matched.

For example, a value of {"field":"Name", "pattern":"my-"} indicates that the specified filter conditions match the routing rules whose names start with my-.', example='{"field":"Name", "pattern":"my-"}'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
  regionId?: string(name='RegionId', description='The ID of the region where the cluster resides.', example='cn-hangzhou'),
}

model ListK8sIngressRulesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: [ 
    {
      clusterId?: string(name='ClusterId', description='The cluster ID.', example='5b2b4ab4-efbc-4a81-9c45-a5942881****'),
      clusterName?: string(name='ClusterName', description='The cluster name.', example='my-dev-cluster'),
      ingressConfs?: [ 
        {
          albId?: string(name='AlbId', description='The ID of the ALB instance.', example='alb-5sde0tq62r********'),
          annotations?: string(name='Annotations', description='The annotations.', example='{"test-annotation":"test-annotation-value"}'),
          creationTime?: string(name='CreationTime', description='The time when the Ingress was created.', example='2021-04-27 20:16:52'),
          dashboardUrl?: string(name='DashboardUrl', description='The monitoring URL of the Ingress.', example='http://grafana.console.aliyun.com/d/10xxxx/ingress'),
          endpoint?: string(name='Endpoint', description='The IP address of the Ingress.', example='47.11x.xx.xx'),
          ingressType?: string(name='IngressType', description='The Ingress type. Valid values:

*   **NginxIngress**: NGINX Ingress controller
*   **AlbIngress**: ALB Ingress controller

Default value: NginxIngress.', example='NginxIngress'),
          labels?: string(name='Labels', description='The tags.', example='{"test-label": "test-labels"}'),
          mseGatewayId?: string(name='MseGatewayId', description='The ID of the MSE gateway.', example='gw-xxxxxxxx'),
          mseGatewayName?: string(name='MseGatewayName', description='The name of the MSE gateway.', example='gw-test-name'),
          name?: string(name='Name', description='The Ingress name.', example='my-ingress'),
          namespace?: string(name='Namespace', description='The Kubernetes namespace to which the Ingress belongs.', example='default'),
          officalBasicUrl?: string(name='OfficalBasicUrl', description='The URL used for basic monitoring of the open source version.', example='https://g.console.aliyun.com/d/xxxxxx/nginx-ingress-dashboard-official'),
          officalRequestUrl?: string(name='OfficalRequestUrl', description='The URL used for request performance monitoring of the open source version.', example='https://g.console.aliyun.com/d/xxxxxx/request-handling-performance-official'),
          rules?: [ 
            {
              enableTls?: boolean(name='EnableTls', description='Indicates whether TLS is enabled. Valid values:

*   true
*   false', example='false'),
              host?: string(name='Host', description='The domain name to be accessed.', example='example.com'),
              paths?: [ 
                {
                  appId?: string(name='AppId', description='The ID of the EDAS application.', example='43d30ba5-c568-460c-8080-d447ed1a****'),
                  appName?: string(name='AppName', description='The name of the EDAS application.', example='my-app'),
                  backend?: {
                    serviceName?: string(name='ServiceName', description='The name of the backend Service.', example='http-service'),
                    servicePort?: string(name='ServicePort', description='The port of the backend Service.', example='8080'),
                  }(name='Backend', description='The configurations of the backend Service.'),
                  collectRate?: int32(name='CollectRate', description='The collection rate that is set based on the trace query feature. You can add a trace ID to a gateway to use the trace query feature of EDAS.', example='100'),
                  path?: string(name='Path', description='The path to be accessed.', example='/foo/bar'),
                  pathType?: string(name='PathType', description='The path type that determines how a path is matched.

*   ImplementationSpecific (default)
*   Exact
*   Prefix', example='ImplementationSpecific'),
                  status?: string(name='Status', description='The state of the Ingress. Valid values:

*   **Normal**: The Ingress works as expected.
*   **ServiceNotFound**: The backend Service does not exist.
*   **InvalidServicePort**: The Service port is invalid.
*   **NotManagedService**: The Service is not managed by EDAS.
*   **Unknown**: An unknown error occurred.', example='Normal'),
                }
              ](name='Paths', description='The paths to be accessed.'),
              secretName?: string(name='SecretName', description='The name of the Secret that stores the Transport Layer Security (TLS) certificate.', example='my-secret'),
            }
          ](name='Rules', description='The routing rules.'),
          sslRedirect?: boolean(name='SslRedirect', description='Indicates whether SSL redirection is enabled. Valid values:

*   true
*   false', example='true'),
        }
      ](name='IngressConfs', description='The Ingresses.'),
      regionId?: string(name='RegionId', description='The ID of the Alibaba Cloud region.', example='cn-hangzhou'),
    }
  ](name='Data', description='The response data.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='5C1C9DE7-88FF-4B56-A47B-3DBBCEB******'),
}

model ListK8sIngressRulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListK8sIngressRulesResponseBody(name='body'),
}

/**
 * @summary Queries ingresses.
 *
 * @param request ListK8sIngressRulesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListK8sIngressRulesResponse
 */
async function listK8sIngressRulesWithOptions(request: ListK8sIngressRulesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListK8sIngressRulesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.condition)) {
    query['Condition'] = request.condition;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListK8sIngressRules',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_ingress`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries ingresses.
 *
 * @param request ListK8sIngressRulesRequest
 * @return ListK8sIngressRulesResponse
 */
async function listK8sIngressRules(request: ListK8sIngressRulesRequest): ListK8sIngressRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listK8sIngressRulesWithOptions(request, headers, runtime);
}

model ListK8sNamespacesRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster in Enterprise Distributed Application Service (EDAS).', example='5b2b4ab4-efbc-4a81-9c45-xxxxxxxxxxxxx'),
}

model ListK8sNamespacesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: [ 
    {
      namespace?: string(name='Namespace', description='The namespaces of the Kubernetes cluster.', example='development'),
    }
  ](name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The message returned for the request.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57F146F6-3C94-****-****-A66EF4B9*****'),
}

model ListK8sNamespacesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListK8sNamespacesResponseBody(name='body'),
}

/**
 * @summary Queries namespaces for a Kubernetes cluster.
 *
 * @param request ListK8sNamespacesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListK8sNamespacesResponse
 */
async function listK8sNamespacesWithOptions(request: ListK8sNamespacesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListK8sNamespacesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListK8sNamespaces',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_namespace`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries namespaces for a Kubernetes cluster.
 *
 * @param request ListK8sNamespacesRequest
 * @return ListK8sNamespacesResponse
 */
async function listK8sNamespaces(request: ListK8sNamespacesRequest): ListK8sNamespacesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listK8sNamespacesWithOptions(request, headers, runtime);
}

model ListK8sSecretsRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='7a953f9a-2946-4c7a-9d82-9939db******'),
  condition?: string(name='Condition', description='The filter conditions. Set this parameter to a JSON string in the format of {"field":"Name", "pattern":"configmap-"}.', example='{\\\\"field\\\\":\\\\"Name\\\\",\\\\"pattern\\\\":\\\\"product\\\\"}'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
  pageNo?: int32(name='PageNo', description='The number of the page to return. Pages start from Page 0.', example='0'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. The value 0 indicates that all entries are returned on one page.', example='10'),
  regionId?: string(name='RegionId', description='The ID of the region.', example='cn-hangzhou'),
  showRelatedApps?: boolean(name='ShowRelatedApps', description='Specifies whether to return a list of applications that use a Secret.', example='true'),
}

model ListK8sSecretsResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
  result?: {
    secrets?: [ 
      {
        base64Encoded?: boolean(name='Base64Encoded', description='Indicates whether the data is Base64-encoded. Valid values:

*   true: The data is Base64-encoded.
*   false: The data is not Base64-encoded.', example='false'),
        certDetail?: {
          domainNames?: [ string ](name='DomainNames', description='Domain names that are associated with the SSL certificate.'),
          endTime?: string(name='EndTime', description='The time when the SSL certificate expired.', example='2022-02-22T02:32:41Z'),
          issuer?: string(name='Issuer', description='The certificate authority (CA) that issued the SSL certificate.', example='CN=GlobalSign Root CA, OU=Root CA, O=GlobalSign nv-sa, C=BE'),
          startTime?: string(name='StartTime', description='The time when the SSL certificate started to take effect.', example='2022-01-02T22:40:00Z'),
          status?: string(name='Status', description='The state of the SSL certificate. Valid values:

*   normal: The SSL certificate is valid.
*   invalid: The SSL certificate is invalid.
*   expired: The SSL certificate has expired.
*   not_yet_valid: The SSL certificate is currently invalid.
*   about_to_expire: The SSL certificate is about to expire.', example='normal'),
        }(name='CertDetail', description='The details of the Secure Sockets Layer (SSL) certificate.'),
        certId?: string(name='CertId', description='The ID of the certificate provided by Alibaba Cloud Certificate Management Service.', example='123456'),
        certRegionId?: string(name='CertRegionId', description='The region in which the certificate is stored.', example='cn-hangzhou'),
        clusterId?: string(name='ClusterId', description='The ID of the cluster in Enterprise Distributed Application Service (EDAS).', example='4472a6d3-f01d-4087-85a7-3dc52********'),
        clusterName?: string(name='ClusterName', description='The name of the cluster.', example='test-cluster'),
        creationTime?: string(name='CreationTime', description='The time when the Secret was created. The time follows the ISO 8601 standard in the *yyyy-MM-dd*T*hh:mm:ss*Z format. The time is displayed in UTC.', example='2022-05-26T02:57:02Z'),
        data?: [ 
          {
            key?: string(name='Key', description='The user-defined key of the Kubernetes Secret.', example='name'),
            value?: string(name='Value', description='The user-defined value of the Kubernetes Secret.', example='william'),
          }
        ](name='Data', description='The data of the Kubernetes Secret.'),
        name?: string(name='Name', description='The name of the Secret. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length.', example='my-secret'),
        namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
        relatedApps?: [ 
          {
            appId?: string(name='AppId', description='The ID of the application.', example='b08eeb18-8946-410c-a1ea-dbbc********'),
            appName?: string(name='AppName', description='The name of the application.', example='my-app'),
          }
        ](name='RelatedApps', description='Applications that use the Secret.'),
        relatedIngressRules?: [ 
          {
            name?: string(name='Name', description='The name of the rule in the Ingress.', example='testrulename'),
            namespace?: string(name='Namespace', description='The namespaces of the Kubernetes cluster.', example='default'),
            relatedApps?: [ 
              {
                appId?: string(name='AppId', description='The ID of the application.', example='6dc74432-5a35-4e68-8aaa-3700********'),
                appName?: string(name='AppName', description='The name of the EDAS application.', example='app-test'),
              }
            ](name='RelatedApps', description='Aplications that are associated with the Ingress.'),
          }
        ](name='RelatedIngressRules', description='Rules in the Ingress that is associated with the Secret.'),
        type?: string(name='Type', description='The type of the Secret. Valid values:

*   Opaque: user-defined data
*   kubernetes.io/tls: Transport Layer Security (TLS) certificate', example='Opaque'),
      }
    ](name='Secrets', description='The information about Kubernetes Secrets.'),
    total?: int32(name='Total', description='The total number of entries that are returned.', example='6'),
  }(name='Result', description='The returned query results of Kubernetes Secrets.'),
}

model ListK8sSecretsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListK8sSecretsResponseBody(name='body'),
}

/**
 * @summary Queries Kubernetes Secrets.
 *
 * @param request ListK8sSecretsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListK8sSecretsResponse
 */
async function listK8sSecretsWithOptions(request: ListK8sSecretsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListK8sSecretsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.condition)) {
    query['Condition'] = request.condition;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.showRelatedApps)) {
    query['ShowRelatedApps'] = request.showRelatedApps;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListK8sSecrets',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_secret`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Kubernetes Secrets.
 *
 * @param request ListK8sSecretsRequest
 * @return ListK8sSecretsResponse
 */
async function listK8sSecrets(request: ListK8sSecretsRequest): ListK8sSecretsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listK8sSecretsWithOptions(request, headers, runtime);
}

model ListMethodsRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='be213a4a-c7e4-473b-ab0****'),
  serviceName?: string(name='ServiceName', description='The name of the service.

This parameter is required.', example='Method'),
}

model ListMethodsResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The returned message that indicates whether the request is successful.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='69AD2AA7-DB47-449B-941B-B14409DF****'),
  serviceMethodList?: {
    serviceMethod?: [ 
    {
      appName?: string(name='AppName', description='The name of the application.', example='App'),
      inputParams?: {
        inputParam?: [ string ](name='InputParam')
      }(name='InputParams'),
      methodName?: string(name='MethodName', description='The name of the service method.', example='echo'),
      output?: string(name='Output', description='The return type of the service method.', example='java.lang.string'),
      paramTypes?: {
        paramType?: [ string ](name='ParamType')
      }(name='ParamTypes'),
      serviceName?: string(name='ServiceName', description='The name of the service.', example='com.alibaba.edas.demo.EchoService'),
    }
  ](name='ServiceMethod')
  }(name='ServiceMethodList', description='The information about service methods.'),
}

model ListMethodsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListMethodsResponseBody(name='body'),
}

/**
 * @summary Queries service methods.
 *
 * @param request ListMethodsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListMethodsResponse
 */
async function listMethodsWithOptions(request: ListMethodsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListMethodsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.serviceName)) {
    query['ServiceName'] = request.serviceName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListMethods',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/service/list_methods`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries service methods.
 *
 * @param request ListMethodsRequest
 * @return ListMethodsResponse
 */
async function listMethods(request: ListMethodsRequest): ListMethodsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listMethodsWithOptions(request, headers, runtime);
}

model ListPublishedServicesRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='1fbd8b72-****-****-bdfe-478dbc914121'),
}

model ListPublishedServicesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  publishedServicesList?: {
    listPublishedServices?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='ECD1D6FC-4307-4583-BA6F-215F3857E****'),
      dockerApplication?: boolean(name='DockerApplication', description='Indicates whether the application runs in a Docker container. Valid values:

*   true: The application runs in a Docker container.
*   false: The application does not run in a Docker container.', example='false'),
      group2Ip?: string(name='Group2Ip', description='A reserved parameter.', example='""'),
      groups?: {
        group?: [ string ](name='group')
      }(name='Groups'),
      ips?: {
        ip?: [ string ](name='ip')
      }(name='Ips'),
      name?: string(name='Name', description='The name of the published service.', example='providers:com.****'),
      type?: string(name='Type', description='The type of the published service.', example='RESTful'),
      version?: string(name='Version', description='The version of the published services.', example='--'),
    }
  ](name='ListPublishedServices')
  }(name='PublishedServicesList', description='The published services.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='1D6FC-4307-4583-BA6F-215F3857E****'),
}

model ListPublishedServicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPublishedServicesResponseBody(name='body'),
}

/**
 * @summary Queries the services that are published by an application.
 *
 * @param request ListPublishedServicesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPublishedServicesResponse
 */
async function listPublishedServicesWithOptions(request: ListPublishedServicesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListPublishedServicesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPublishedServices',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/service/listPublishedServices`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the services that are published by an application.
 *
 * @param request ListPublishedServicesRequest
 * @return ListPublishedServicesResponse
 */
async function listPublishedServices(request: ListPublishedServicesRequest): ListPublishedServicesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listPublishedServicesWithOptions(request, headers, runtime);
}

model ListRecentChangeOrderRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='3616cdca-4f92-4413-****-************'),
}

model ListRecentChangeOrderResponseBody = {
  changeOrderList?: {
    changeOrder?: [ 
    {
      appId?: string(name='AppId', description='The ID of the application.', example='3616cdca-4f92-4413-****-************'),
      batchCount?: int32(name='BatchCount', description='The number of batches for the change. Valid values: 1 to 5.', example='1'),
      batchType?: string(name='BatchType', description='The way in which the next batch is triggered during a phased release. Valid values:

*   Automatic
*   Manual', example='Automatic'),
      changeOrderDescription?: string(name='ChangeOrderDescription', description='The description of the change process.', example='Version: 2020-05-14 20:02:33 | Deployment Package: hsf-pandora-boot-provider-1.0.jar | Deploy to: all groups'),
      changeOrderId?: string(name='ChangeOrderId', description='The unique ID of the change process.', example='1074f3e2-e974-4a0e-****-************'),
      coType?: string(name='CoType', description='The type of the change process.', example='Application Scale Out'),
      coTypeCode?: string(name='CoTypeCode', description='The type of the change process.', example='CoDeploy'),
      createTime?: string(name='CreateTime', description='The time when the change process was created.', example='2019-11-13 14:23:46'),
      createUserId?: string(name='CreateUserId', description='The user who created the change process.', example='edas_test1@aliyun-test.com'),
      finishTime?: string(name='FinishTime', description='The time when the change process ended.', example='2019-11-13 14:24:02'),
      groupId?: string(name='GroupId', description='The ID of the application instance group on which the change was performed.', example='8123db90-880f-486f-****-************'),
      source?: string(name='Source', description='The source of the change. Valid values:

*   console: the Enterprise Distributed Application Service (EDAS) console
*   pop: the POP API or tool', example='pop'),
      status?: int32(name='Status', description='The state of the change process. Valid values:

*   0: ready to start execution
*   1: in progress
*   2: successful
*   3: failed
*   6: terminated
*   8: waiting for manual confirmation (You can see the state when you manually confirm the execution of the next batch of the change.)
*   9: waiting for automatic execution
*   10: failed due to a system error', example='2'),
      userId?: string(name='UserId', description='The ID of the user who created the change process.', example='1432536****'),
    }
  ](name='ChangeOrder')
  }(name='ChangeOrderList', description='The information about change processes.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-************'),
}

model ListRecentChangeOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRecentChangeOrderResponseBody(name='body'),
}

/**
 * @summary Queries the change processes of an application.
 *
 * @param request ListRecentChangeOrderRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRecentChangeOrderResponse
 */
async function listRecentChangeOrderWithOptions(request: ListRecentChangeOrderRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListRecentChangeOrderResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListRecentChangeOrder',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/change_order_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the change processes of an application.
 *
 * @param request ListRecentChangeOrderRequest
 * @return ListRecentChangeOrderResponse
 */
async function listRecentChangeOrder(request: ListRecentChangeOrderRequest): ListRecentChangeOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listRecentChangeOrderWithOptions(request, headers, runtime);
}

model ListResourceGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
  resourceGroupList?: {
    resGroupEntity?: [ 
    {
      adminUserId?: string(name='AdminUserId', description='The UID of the Alibaba Cloud account.', example='****@aliyun.com'),
      createTime?: long(name='CreateTime', description='The time when the resource group was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1557890594376'),
      description?: string(name='Description', description='The description of the resource group.', example='QqLZDA3pBZ'),
      id?: long(name='Id', description='The ID of the resource group.', example='8592'),
      name?: string(name='Name', description='The name of the resource group.', example='TIa2LGixyD'),
      regionId?: string(name='RegionId', description='The ID of the region where the resource group belongs.', example='cn-qingdao'),
      slbList?: {
        slbEntity?: [ 
        {
          address?: string(name='Address', description='The IP address of the SLB instance.', example='192.168.xxx.xx'),
          addressType?: string(name='AddressType', description='The type of the IP address of the SLB instance. Valid values:

*   Internet: Users can connect to the SLB instance over the Internet.
*   Intranet: Users can connect to the SLB instance over the internal network.', example='Intranet'),
          expired?: boolean(name='Expired', description='Indicates whether the SLB instance has expired. Valid values:

*   true: The SLB instance has expired.
*   false: The SLB instance has not expired.', example='true'),
          groupId?: int32(name='GroupId', description='The ID of the group to which the SLB instance belongs.', example='64189****'),
          networkType?: string(name='NetworkType', description='The network type of the SLB instance. Valid values:

*   Classic network
*   VPC', example='vpc'),
          regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
          slbId?: string(name='SlbId', description='The unique ID of the SLB instance.', example='lb-2zebf1fpbpkc7dnro****'),
          slbName?: string(name='SlbName', description='The name of the SLB instance.', example='a9315af59b4cd11e9a18c00163e1****'),
          slbStatus?: string(name='SlbStatus', description='The status of the SLB instance.', example='active'),
          userId?: string(name='UserId', description='The UID of the Alibaba Cloud account.', example='****@aliyun.com'),
          vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-m5e666n89m2bx8jar****'),
          vswitchId?: string(name='VswitchId', description='The ID of the vSwitch.', example='vsw-mktkxkhah14****'),
        }
      ](name='SlbEntity')
      }(name='SlbList', description='The Server Load Balancer (SLB) instances.'),
      updateTime?: long(name='UpdateTime', description='The time when the resource group was updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281040827'),
      ecsList?: {
        ecsEntity?: [ 
        {
          cpu?: int32(name='Cpu', description='The total number of CPU cores.', example='2'),
          description?: string(name='Description', description='The description of the ECS instance.', example='test'),
          ecuEntity?: {
            availableCpu?: int32(name='AvailableCpu', description='The number of available CPUs.', example='1'),
            availableMem?: int32(name='AvailableMem', description='The size of the available memory.', example='200'),
            cpu?: int32(name='Cpu', description='The total number of CPU cores.', example='2'),
            createTime?: long(name='CreateTime', description='The time when the ECU was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1557890594376'),
            dockerEnv?: boolean(name='DockerEnv', description='Indicates whether Docker is installed. Valid values:

*   true: Docker is installed.
*   false: Docker is not installed.', example='true'),
            ecuId?: string(name='EcuId', description='The unique ID of the elastic compute unit (ECU). You can run the `dmidecode` command on the ECS instance to query the ECU ID.', example='0de2ebdb-9490-4fc4-be41***************'),
            heartbeatTime?: long(name='HeartbeatTime', description='The time when the last heartbeat detection was performed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281040819'),
            instanceId?: string(name='InstanceId', description='The ID of the instance.', example='i-2zej4i2jdf*********'),
            ipAddr?: string(name='IpAddr', description='The private IP address of the ECU.', example='192.168.xxx.xx'),
            mem?: int32(name='Mem', description='The total size of memory. Unit: MB.', example='200'),
            name?: string(name='Name', description='The name of the ECU.', example='test'),
            online?: boolean(name='Online', description='Indicates whether the ECU is online. Valid values:

*   true: The ECU is online.
*   false: The ECU is offline.', example='true'),
            regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
            updateTime?: long(name='UpdateTime', description='The time when the ECU was updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281040827'),
            userId?: string(name='UserId', description='The ID of the user associated with the ECU.', example='edas_****_test@aliyun-****.com'),
            vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-2ze1ram356umxs598****'),
            zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-beijing-b'),
          }(name='EcuEntity', description='The elastic compute unit (ECU) that corresponds to the ECS instance.'),
          eip?: string(name='Eip', description='The elastic IP address (EIP).', example='192.168.xxx.xx'),
          expired?: boolean(name='Expired', description='Indicates whether the ECS instance has expired. Valid values:

*   true: The ECS instance has expired.
*   false: The ECS instance has not expired.', example='true'),
          groupId?: string(name='GroupId', description='The ID of the resource group in Enterprise Distributed Application Service (EDAS).', example='64189****'),
          hostName?: string(name='HostName', description='The name of the host.', example='iZm5e853hvvrodnvqus****'),
          innerIp?: string(name='InnerIp', description='The private IP address.', example='192.168.xx.xxx'),
          instanceId?: string(name='InstanceId', description='The ID of the ECS instance.', example='i-m5e853hvvrodnvqu****'),
          instanceName?: string(name='InstanceName', description='The name of the ECS instance.', example='betabjmixcoud_01'),
          mem?: int32(name='Mem', description='The total size of memory. Unit: MB.', example='1'),
          privateIp?: string(name='PrivateIp', description='The private IP address of the ECS instance.', example='192.168.xx.xxx'),
          publicIp?: string(name='PublicIp', description='The public IP address.', example='192.168.xx.xxx'),
          regionId?: string(name='RegionId', description='The ID of the region.', example='ch-hangzhou'),
          serialNum?: string(name='SerialNum', description='The serial number of the ECS instance.', example='98b480b8-458b-4ff3-84b9-cf7097c5****'),
          sgId?: string(name='SgId', description='The ID of the security group.', example='sg-m5eajgzn6b8sg9mv****'),
          status?: string(name='Status', description='The status of the ECS instance. Valid values:

*   Pending: The ECS instance is being created.
*   Running: The ECS instance is running.
*   Starting: The ECS instance is being started.
*   Stopping: The ECS instance is being stopped.
*   Stopped: The ECS instance is stopped.', example='Running'),
          userId?: string(name='UserId', description='The ID of the user account.', example='****_common_****@aliyun.com'),
          vpcEntity?: {
            cidrblock?: string(name='Cidrblock', description='The IPv4 CIDR block of the vSwitch.', example='192.168.xx.xxx'),
            description?: string(name='Description', description='The description of the VPC.', example='""'),
            ecsNum?: int32(name='EcsNum', description='The number of ECS instances that run in the VPC.', example='1'),
            expired?: boolean(name='Expired', description='Indicates whether the VPC has expired. Valid values:

*   true: The VPC has expired.
*   false: The VPC has not expired.', example='true'),
            regionId?: string(name='RegionId', description='The ID of the region.', example='cn-qingdao'),
            status?: string(name='Status', description='The status of the VPC.', example='Running'),
            userId?: string(name='UserId', description='The ID of the user.', example='****_common_****@aliyun.com'),
            vpcId?: string(name='VpcId', description='The unique ID of the VPC.', example='vpc-bp13evu42t1er****'),
            vpcName?: string(name='VpcName', description='The name of the VPC.', example='test'),
          }(name='VpcEntity', description='The VPCs.'),
          vpcId?: string(name='VpcId', description='The unique ID of the virtual private cloud (VPC).', example='vpc-bp13evu4aayj2t1er****'),
          zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-qingdao-h'),
        }
      ](name='EcsEntity')
      }(name='ecsList', description='The Elastic Compute Service (ECS) instances.'),
    }
  ](name='ResGroupEntity')
  }(name='ResourceGroupList', description='For more information about how to define a resource group, see ResGroupEntity.'),
}

model ListResourceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListResourceGroupResponseBody(name='body'),
}

/**
 * @summary Queries resource groups.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListResourceGroupResponse
 */
async function listResourceGroupWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListResourceGroupResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListResourceGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/reg_group_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries resource groups.
 *
 * @return ListResourceGroupResponse
 */
async function listResourceGroup(): ListResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listResourceGroupWithOptions(headers, runtime);
}

model ListRoleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57609587-DFA2-41EC-****-*********'),
  roleList?: {
    roleItem?: [ 
    {
      actionList?: {
        action?: [ 
        {
          code?: string(name='Code', description='The serial number of the permission that is granted to the role.', example='1'),
          description?: string(name='Description', description='The description of the permission to be granted to the role.', example='Operations in operation records'),
          groupId?: string(name='GroupId', description='The ID of the permission group to which the permission that is granted to the role belongs.', example='31'),
          name?: string(name='Name', description='The name of the permission to be granted to the role.', example='Operation records'),
        }
      ](name='Action')
      }(name='ActionList', description='The set of permissions to be granted to the role.'),
      role?: {
        adminUserId?: string(name='AdminUserId', description='The ID of the Alibaba Cloud account.', example='test**@aliyun.com'),
        createTime?: long(name='CreateTime', description='The timestamp when the role was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1542717260156'),
        id?: int32(name='Id', description='The ID of the role.', example='1'),
        isDefault?: boolean(name='IsDefault', description='Indicates whether the role is a default role.', example='false'),
        name?: string(name='Name', description='The name of the role.', example='Super Admin(All privileges)'),
        updateTime?: long(name='UpdateTime', description='The timestamp when the role was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1542717260156'),
      }(name='Role', description='The roles.'),
    }
  ](name='RoleItem')
  }(name='RoleList', description='The roles.'),
}

model ListRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRoleResponseBody(name='body'),
}

/**
 * @summary Queries roles.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRoleResponse
 */
async function listRoleWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListRoleResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListRole',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/role_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries roles.
 *
 * @return ListRoleResponse
 */
async function listRole(): ListRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listRoleWithOptions(headers, runtime);
}

model ListScaleOutEcuRequest {
  appId?: string(name='AppId', description='The ID of the application. Specify this parameter if you want to query the available ECUs in the cluster where the application is deployed.

>  Specify at least one of the ClusterId and AppId parameters as the query parameter.', example='b93024fd-8a9d-4ef7-99f1-5f0d65cc****'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster. Specify this parameter if you want to query the available ECUs in the cluster.

> Specify at least one of the ClusterId and AppId parameters as the query parameter.', example='52984524-6d48-4bbd-******************'),
  cpu?: int32(name='Cpu', description='The number of CPU cores based on which you want to query the available ECUs in the cluster.', example='1'),
  groupId?: string(name='GroupId', description='The ID of the instance group. Specify this parameter if you want to query the available ECUs in the cluster where the instance group resides.', example='8123db90-880f-486f-****-****'),
  instanceNum?: int32(name='InstanceNum', description='The number of ECUs that you want to query. If this parameter is not specified, all the ECUs that meet the query conditions are returned.', example='1'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the namespace.

*   The ID of a custom namespace is in the `region ID:namespace identifier` format. Example: cn-beijing:test.
*   The ID of the default namespace is in the `region ID` format. Example: cn-beijing.', example='cn-beijing:test'),
  mem?: int32(name='Mem', description='The size of available memory based on which you want to query the available ECUs in the cluster. Unit: MB.', example='200'),
}

model ListScaleOutEcuResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  ecuInfoList?: {
    ecuInfo?: [ 
    {
      availableCpu?: int32(name='AvailableCpu', description='The number of available CPU cores for the ECU.', example='2'),
      availableMem?: int32(name='AvailableMem', description='The size of available memory for the ECU. Unit: MB.', example='111'),
      createTime?: long(name='CreateTime', description='The time when the ECU was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281040819'),
      dockerEnv?: boolean(name='DockerEnv', description='Indicates whether Docker is installed. Valid values:

*   true: Docker is installed.
*   false: Docker is not installed.', example='false'),
      ecuId?: string(name='EcuId', description='The unique ID of the ECU. To query the ID, you can run the `dmidecode` command on the ECS instance that corresponds to the ECU.', example='0de2ebdb-9490-4fc4-be41***************'),
      heartbeatTime?: long(name='HeartbeatTime', description='The time when the last heartbeat detection was performed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281040819'),
      instanceId?: string(name='InstanceId', description='The ID of the ECU.', example='i-2zej4i2jdf*********'),
      ipAddr?: string(name='IpAddr', description='The private IP address of the ECU.', example='192.168.XX.XX'),
      name?: string(name='Name', description='The name of the ECU.', example='test'),
      online?: boolean(name='Online', description='Indicates whether the ECU is online. If the ECU is online, its corresponding ECS instance is managed in EDAS. Valid values:

*   true: The ECU is online.
*   false: The ECU is offline.', example='true'),
      regionId?: string(name='RegionId', description='The ID of the region where the ECU is located.', example='cn-beijing'),
      updateTime?: long(name='UpdateTime', description='The time when the ECU was last updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281040827'),
      userId?: string(name='UserId', description='The ID of the Alibaba Cloud account to which the ECU belongs.', example='1172****6608****'),
      vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) where the ECU is located.', example='vpc-2zef6ob8**********'),
      zoneId?: string(name='ZoneId', description='The ID of the zone where the ECU resides.', example='cn-beijing-h'),
    }
  ](name='EcuInfo')
  }(name='EcuInfoList', description='The ECUs.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='AF860D6C-ACE3-4429-9D54-3BD15A******'),
}

model ListScaleOutEcuResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListScaleOutEcuResponseBody(name='body'),
}

/**
 * @summary Queries elastic compute units (ECUs) available for scaling out an application in a specified cluster or the cluster where the application is deployed. This operation is applicable to Elastic Compute Service (ECS) clusters.
 *
 * @description ## Terms
 * *   **Namespace**: the logical concept that is used to isolate resources such as clusters, ECS instances, and applications, and microservices published in EDAS. This concept involves the default namespace and custom namespaces. Each region has a default namespace and supports multiple custom namespaces. By default, only the default namespace is available. You do not need to create a custom namespace if you do not want to isolate resources and microservices.
 * *   **Elastic compute unit (ECU)**: After an ECS instance is imported to a cluster, the instance becomes an ECU.
 * *   **Elastic compute container (ECC)**: After you deploy an application to an ECU in a cluster, the ECU becomes an ECC.
 *
 * @param request ListScaleOutEcuRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListScaleOutEcuResponse
 */
async function listScaleOutEcuWithOptions(request: ListScaleOutEcuRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListScaleOutEcuResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.cpu)) {
    query['Cpu'] = request.cpu;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.instanceNum)) {
    query['InstanceNum'] = request.instanceNum;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }
  if (!Util.isUnset(request.mem)) {
    query['Mem'] = request.mem;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListScaleOutEcu',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/scale_out_ecu_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries elastic compute units (ECUs) available for scaling out an application in a specified cluster or the cluster where the application is deployed. This operation is applicable to Elastic Compute Service (ECS) clusters.
 *
 * @description ## Terms
 * *   **Namespace**: the logical concept that is used to isolate resources such as clusters, ECS instances, and applications, and microservices published in EDAS. This concept involves the default namespace and custom namespaces. Each region has a default namespace and supports multiple custom namespaces. By default, only the default namespace is available. You do not need to create a custom namespace if you do not want to isolate resources and microservices.
 * *   **Elastic compute unit (ECU)**: After an ECS instance is imported to a cluster, the instance becomes an ECU.
 * *   **Elastic compute container (ECC)**: After you deploy an application to an ECU in a cluster, the ECU becomes an ECC.
 *
 * @param request ListScaleOutEcuRequest
 * @return ListScaleOutEcuResponse
 */
async function listScaleOutEcu(request: ListScaleOutEcuRequest): ListScaleOutEcuResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listScaleOutEcuWithOptions(request, headers, runtime);
}

model ListServiceGroupsResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
  serviceGroupsList?: {
    listServiceGroups?: [ 
    {
      createTime?: string(name='CreateTime', description='The time when the service group was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1575357165770'),
      groupId?: string(name='GroupId', description='The ID of the service group.', example='789d9cda-74b1-****-****-05e21a0a7661'),
      groupName?: string(name='GroupName', description='The name of the service group.', example='edas-test-group'),
    }
  ](name='ListServiceGroups')
  }(name='ServiceGroupsList', description='The information about service groups.'),
}

model ListServiceGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListServiceGroupsResponseBody(name='body'),
}

/**
 * @summary Queries the service groups of a High-Speed Service Framework (HSF) application.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListServiceGroupsResponse
 */
async function listServiceGroupsWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListServiceGroupsResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListServiceGroups',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/service/serviceGroups`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the service groups of a High-Speed Service Framework (HSF) application.
 *
 * @return ListServiceGroupsResponse
 */
async function listServiceGroups(): ListServiceGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listServiceGroupsWithOptions(headers, runtime);
}

model ListSlbRequest {
  addressType?: string(name='AddressType', description='The type of the IP addresses. Valid values:

*   Internet: Users can connect to the SLB instance over the Internet.
*   Intranet: Users can connect to the SLB instance over the internal network.', example='internet'),
  slbType?: string(name='SlbType', description='The type of the SLB instance. Valid values:

*   clb: Classic Load Balancer (CLB)
*   alb: Application Load Balancer (ALB)', example='clb'),
  vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC).', example='vpc-bp1f90rfybszjogyw****'),
}

model ListSlbResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
  slbList?: {
    slbEntity?: [ 
    {
      address?: string(name='Address', description='The IP address of the SLB instance.', example='39.176.XX.XX'),
      addressType?: string(name='AddressType', description='The type of the IP addresses. Valid values:

*   internet: Users can connect to the SLB instance over the Internet.
*   intranet: Users can connect to the SLB instance over the internal network.', example='internet'),
      expired?: boolean(name='Expired', description='Indicates whether the SLB instance has expired. Valid values:

*   true: The SLB instance has expired.
*   false: The SLB instance has not expired.', example='false'),
      groupId?: int32(name='GroupId', description='The ID of the resource group in Enterprise Distributed Application Service (EDAS).', example='0'),
      networkType?: string(name='NetworkType', description='The type of the network.', example='classic'),
      regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
      reusable?: boolean(name='Reusable', description='Indicates whether Kubernetes applications can be reused. Valid values:

*   true: Kubernetes applications can be reused.
*   false: Kubernetes applications cannot be reused.', example='true'),
      slbId?: string(name='SlbId', description='The ID of the SLB instance.', example='lb-2ze055t3xv7s8****'),
      slbName?: string(name='SlbName', description='The name of the SLB instance.', example='adce'),
      slbStatus?: string(name='SlbStatus', description='The status of the SLB instance.', example='active'),
      tags?: string(name='Tags', description='The tag of the SLB instance.', example='[{"tagKey":"tag","tagValue":"value"}]'),
      userId?: string(name='UserId', description='The ID of the user.', example='edas_****_**st@aliyun-****.com'),
      vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-bp1f90rfybszjogyw****'),
      vswitchId?: string(name='VswitchId', description='The ID of the vSwitch in the VPC.', example='vsw-bp156w1gpbv0o50hs****'),
    }
  ](name='SlbEntity')
  }(name='SlbList', description='The list of SLB instances.'),
}

model ListSlbResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSlbResponseBody(name='body'),
}

/**
 * @summary Queries Server Load Balancer (SLB) instances.
 *
 * @param request ListSlbRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSlbResponse
 */
async function listSlbWithOptions(request: ListSlbRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListSlbResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.addressType)) {
    query['AddressType'] = request.addressType;
  }
  if (!Util.isUnset(request.slbType)) {
    query['SlbType'] = request.slbType;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSlb',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/slb_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Server Load Balancer (SLB) instances.
 *
 * @param request ListSlbRequest
 * @return ListSlbResponse
 */
async function listSlb(request: ListSlbRequest): ListSlbResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listSlbWithOptions(request, headers, runtime);
}

model ListSubAccountResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='message'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57609587-DFA2-41EC-****-*********'),
  subAccountList?: {
    subAccount?: [ 
    {
      adminEdasId?: string(name='AdminEdasId', description='The ID of the Alibaba Cloud account. This ID is generated by EDAS.', example='12456889****'),
      adminUserId?: string(name='AdminUserId', description='The ID of the Alibaba Cloud account.', example='test@13624697***'),
      adminUserKp?: string(name='AdminUserKp', description='This parameter is the same as the AdminEdasId parameter. This parameter is deprecated.', example='12456889****'),
      email?: string(name='Email', description='The email address of the RAM user.', example='email@aliyun.com'),
      phone?: string(name='Phone', description='The contact information of the RAM user.', example='1373322****'),
      subEdasId?: string(name='SubEdasId', description='The ID of the RAM user. This ID is generated by Enterprise Distributed Application Service (EDAS).', example='28382009411268****'),
      subUserId?: string(name='SubUserId', description='The ID of the RAM user.', example='ram1@117274586608****'),
      subUserKp?: string(name='SubUserKp', description='This parameter is the same as the SubEdasId parameter. This parameter is deprecated.', example='28382009411268****'),
    }
  ](name='SubAccount')
  }(name='SubAccountList', description='The RAM users.'),
}

model ListSubAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSubAccountResponseBody(name='body'),
}

/**
 * @summary Queries the Resource Access Management (RAM) users.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSubAccountResponse
 */
async function listSubAccountWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListSubAccountResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListSubAccount',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/sub_account_list`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the Resource Access Management (RAM) users.
 *
 * @return ListSubAccountResponse
 */
async function listSubAccount(): ListSubAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listSubAccountWithOptions(headers, runtime);
}

model ListSwimmingLaneRequest {
  groupId?: long(name='GroupId', description='The ID of the lane group.

This parameter is required.', example='79'),
}

model ListSwimmingLaneResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: [ 
    {
      enableRules?: boolean(name='EnableRules', description='Indicates whether the throttling rule is enabled.', example='true'),
      entryRule?: string(name='EntryRule', description='The conditions.', example='[{\\\\"condition\\\\":\\\\"AND\\\\",\\\\"enable\\\\":true,\\\\"path\\\\":\\\\"/\\\\",\\\\"priority\\\\":1,\\\\"restItems\\\\":[{\\\\"cond\\\\":\\\\"==\\\\",\\\\"datum\\\\":\\\\"value\\\\",\\\\"name\\\\":\\\\"tags\\\\",\\\\"operator\\\\":\\\\"rawvalue\\\\",\\\\"type\\\\":\\\\"header\\\\",\\\\"value\\\\":\\\\"value\\\\"}]}]'),
      groupId?: long(name='GroupId', description='The ID of the lane group.', example='156'),
      id?: long(name='Id', description='The ID of the lane.', example='348'),
      name?: string(name='Name', description='The name of the lane.', example='name'),
      namespaceId?: string(name='NamespaceId', description='The ID of the microservices namespace.', example='cn-hangzhou:pre2'),
      scenarioSign?: string(name='ScenarioSign', description='The expected tag.', example='d0ad1052'),
      swimmingLaneAppRelationShipList?: [ 
        {
          appId?: string(name='AppId', description='The ID of the application.', example='3b615783-01f1-4569-baa3-cb71bdb6****'),
          appName?: string(name='AppName', description='The name of the application.', example='prod-app-58846'),
          extra?: string(name='Extra', description='Additional information.', example='edas-canary'),
          laneId?: long(name='LaneId', description='The ID of the lane.', example='348'),
          rules?: string(name='Rules', description='The association rule.', example='""'),
        }
      ](name='SwimmingLaneAppRelationShipList', description='The applications that are related to the lane.'),
      tag?: string(name='Tag', description='The tag.', example='2cb6b8a'),
    }
  ](name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='C2CDBBF9-9C9A-5AA1-9F39-094ADEB3****'),
}

model ListSwimmingLaneResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSwimmingLaneResponseBody(name='body'),
}

/**
 * @summary Queries lanes in a lane group.
 *
 * @param request ListSwimmingLaneRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSwimmingLaneResponse
 */
async function listSwimmingLaneWithOptions(request: ListSwimmingLaneRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListSwimmingLaneResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSwimmingLane',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/trafficmgnt/swimming_lanes`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries lanes in a lane group.
 *
 * @param request ListSwimmingLaneRequest
 * @return ListSwimmingLaneResponse
 */
async function listSwimmingLane(request: ListSwimmingLaneRequest): ListSwimmingLaneResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listSwimmingLaneWithOptions(request, headers, runtime);
}

model ListSwimmingLaneGroupRequest {
  groupId?: long(name='GroupId', description='The ID of the lane group.', example='0'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the namespace.

The ID of a custom namespace is in the region ID:namespace identifier format. Example: cn-beijing:test.\\\\
The ID of the default namespace is in the region ID format. Example: cn-beijing.

This parameter is required.', example='cn-shenzhen:publish'),
}

model ListSwimmingLaneGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: [ 
    {
      applicationList?: [ 
        {
          appId?: string(name='AppId', description='The ID of the application.', example='406073bf-afc2-4142-b3d7-629a0308****'),
          appName?: string(name='AppName', description='The name of the application.', example='java-app'),
        }
      ](name='ApplicationList', description='The applications that are related to the lane group.'),
      entryApplication?: {
        appId?: string(name='AppId', description='The ID of the application.', example='406073bf-afc2-4142-b3d7-629a0308****'),
        appName?: string(name='AppName', description='The name of the application.', example='java-app'),
        source?: string(name='Source', description='The data source. Set the value to EDAS.', example='EDAS'),
      }(name='EntryApplication', description='The information about the Enterprise Distributed Application Service (EDAS) ingress gateway.'),
      id?: long(name='Id', description='The ID of the lane group.', example='257'),
      name?: string(name='Name', description='The name of the lane group.', example='name'),
      namespaceId?: string(name='NamespaceId', description='The ID of the microservices namespace.', example='cn-shanghai:daily'),
    }
  ](name='Data', description='The data of the lane group.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='BF238E37-671A-5045-B49A-0B29C166****'),
}

model ListSwimmingLaneGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSwimmingLaneGroupResponseBody(name='body'),
}

/**
 * @summary Queries lane groups.
 *
 * @param request ListSwimmingLaneGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSwimmingLaneGroupResponse
 */
async function listSwimmingLaneGroupWithOptions(request: ListSwimmingLaneGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListSwimmingLaneGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSwimmingLaneGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/trafficmgnt/swimming_lane_groups`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries lane groups.
 *
 * @param request ListSwimmingLaneGroupRequest
 * @return ListSwimmingLaneGroupResponse
 */
async function listSwimmingLaneGroup(request: ListSwimmingLaneGroupRequest): ListSwimmingLaneGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listSwimmingLaneGroupWithOptions(request, headers, runtime);
}

model ListTagResourcesRequest {
  resourceIds?: map[string]any(name='ResourceIds', description='The IDs of the resources. You can specify up to 20 IDs. Set this parameter to a JSON array.', example='["000e5836-xxxx-xxxx-xxxx-0d6ab2ac4877"]'),
  resourceRegionId?: string(name='ResourceRegionId', description='The region in which the resource resides.

This parameter is required.', example='cn-hangzhou'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:

*   **application**: Enterprise Distributed Application Service (EDAS) application
*   **cluster**: EDAS cluster

This parameter is required.', example='application'),
  tags?: map[string]any(name='Tags', description='The key-value pairs that specify the tags.

*   You can add up to 20 tags to a resource.
*   The key cannot start with **aliyun** or **acs:** and cannot contain **http://** or **https://**.
*   The tag key or tag value can be up to 128 characters in length, and can contain letters, digits, hyphens (-), commas (,), asterisks (\\\\*), forward slashes (/), question marks (?), and colons (:).
*   Set this parameter to a JSON array.', example='[{"key":"key1","value":"v1"},{"key":"key2","value":"v2"}]'),
}

model ListTagResourcesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='xxxxE654-xxxx-xxxx-xxxx-98F45996xxxx'),
  tagResources?: {
    tagResource?: [ 
    {
      resourceId?: string(name='ResourceId', description='The ID of the resource.', example='000e5836-xxxx-xxxx-xxxx-0d6ab2ac4877'),
      resourceType?: string(name='ResourceType', description='The type of the resource.', example='ALIYUN::EDAS::APPLICATION'),
      tagKey?: string(name='TagKey', description='The tag key of the resource.', example='key1'),
      tagValue?: string(name='TagValue', description='The tag value of the resource.', example='value1'),
    }
  ](name='TagResource')
  }(name='TagResources', description='The information about resource tags.'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @summary Queries the tags that are added to resources.
 *
 * @param request ListTagResourcesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.resourceIds)) {
    query['ResourceIds'] = request.resourceIds;
  }
  if (!Util.isUnset(request.resourceRegionId)) {
    query['ResourceRegionId'] = request.resourceRegionId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/tag/tags`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the tags that are added to resources.
 *
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listTagResourcesWithOptions(request, headers, runtime);
}

model ListUserDefineRegionRequest {
  debugEnable?: boolean(name='DebugEnable', description='Specifies whether remote debugging is allowed.', example='false'),
}

model ListUserDefineRegionResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
  userDefineRegionList?: {
    userDefineRegionEntity?: [ 
    {
      belongRegion?: string(name='BelongRegion', description='The ID of the region to which the namespace belongs.', example='cn-shenzhen'),
      debugEnable?: boolean(name='DebugEnable', description='Indicates whether remote debugging is allowed.', example='false'),
      description?: string(name='Description', description='The description of the namespace.', example='betaappManager'),
      id?: long(name='Id', description='The unique identifier of the namespace.', example='1330'),
      mseInstanceId?: string(name='MseInstanceId', description='The type of the registry. Valid values:

*   default: shared service registry of Enterprise Distributed Application Service (EDAS)
*   exclusive_mse: Microservices Engine (MSE) Nacos registry', example='default: EDAS'),
      regionId?: string(name='RegionId', description='The ID of the namespace.

> The ID cannot be changed after the namespace is created. The ID is in the `Physical region ID:Logical region identifier` format .', example='cn-shenzhen:betaappManager'),
      regionName?: string(name='RegionName', description='The name of the namespace.', example='betaappManager'),
      registryType?: string(name='RegistryType', description='The ID of the MSE instance.', example='mse_prepaid_public_cn-tl32n******'),
      userId?: string(name='UserId', description='The ID of the Alibaba Cloud account to which the namespace belongs.', example='edas_****_test@aliyun-****.com'),
    }
  ](name='UserDefineRegionEntity')
  }(name='UserDefineRegionList', description='The namespaces.'),
}

model ListUserDefineRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserDefineRegionResponseBody(name='body'),
}

/**
 * @summary Queries custom namespaces.
 *
 * @param request ListUserDefineRegionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserDefineRegionResponse
 */
async function listUserDefineRegionWithOptions(request: ListUserDefineRegionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListUserDefineRegionResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.debugEnable)) {
    query['DebugEnable'] = request.debugEnable;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserDefineRegion',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/user_region_defs`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries custom namespaces.
 *
 * @param request ListUserDefineRegionRequest
 * @return ListUserDefineRegionResponse
 */
async function listUserDefineRegion(request: ListUserDefineRegionRequest): ListUserDefineRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listUserDefineRegionWithOptions(request, headers, runtime);
}

model ListVpcResponseBody = {
  code?: int32(name='Code', description='The ID of the request.', example='200'),
  message?: string(name='Message', description='The information about VPCs.', example='success'),
  requestId?: string(name='RequestId', description='The name of the VPC.', example='b197-40ab-9155-7ca7'),
  vpcList?: {
    vpcEntity?: [ 
    {
      ecsNum?: int32(name='EcsNum', description='This operation uses only common request headers. For more information, see [Common parameters for API calls](https://help.aliyun.com/document_detail/123488.html).', example='0'),
      expired?: boolean(name='Expired', description='The region ID of the VPC.', example='false'),
      regionId?: string(name='RegionId', description='No request parameters.', example='cn-shenzhen'),
      userId?: string(name='UserId', description='GET /pop/v5/vpc_list HTTP/1.1
Common request headers', example='edas_****_test@aliyun-****.com'),
      vpcId?: string(name='VpcId', description='The ID of the Alibaba Cloud account to which the VPC belongs.', example='vpc-wz9pcq3jofczwpujq****'),
      vpcName?: string(name='VpcName', description='The number of ECS instances associated with the VPC.', example='edas-default-vpc4'),
    }
  ](name='VpcEntity')
  }(name='VpcList', description='Indicates whether the VPC is available. Valid values:
- true: The VPC is available.
- false: The VPC is unavailable.'),
}

model ListVpcResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListVpcResponseBody(name='body'),
}

/**
 * @summary The HTTP status code returned.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListVpcResponse
 */
async function listVpcWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): ListVpcResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListVpc',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/vpc_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary The HTTP status code returned.
 *
 * @return ListVpcResponse
 */
async function listVpc(): ListVpcResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listVpcWithOptions(headers, runtime);
}

model MigrateEcuRequest {
  instanceIds?: string(name='InstanceIds', description='The ID of the ECS instance. Separate multiple IDs with commas (,).

This parameter is required.', example='i-2zej4i2jdf3ntwhj****'),
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the custom namespace.

*   The ID of a custom namespace is in the `region ID:custom namespace ID` format. Example: cn-beijing:tdy218.
*   The ID of the default namespace is in the `region ID` format. Example: cn-beijing.', example='cn-hangzhou:test_region'),
}

model MigrateEcuResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='Indicates whether the request is successful. Valid values:

*   true: The request is successful.
*   false: The request fails.', example='true'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='04B0ABAF-95F2-42B6-A7B1****'),
}

model MigrateEcuResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: MigrateEcuResponseBody(name='body'),
}

/**
 * @summary Migrates an elastic compute unit (ECU) to the default cluster in a specified namespace.
 *
 * @description ## Limits
 * We recommend that you do not call this operation. Instead, we recommend that you call the TransformClusterMember operation. For more information, see [TransformClusterMember](https://help.aliyun.com/document_detail/71514.html).
 * When you call this operation to import an Elastic Compute Service (ECS) instance, the operating system of the ECS instance is reinstalled. After the operating system is reinstalled, all data of the ECS instance is deleted. You must set a logon password for the ECS instance. Make sure that no important data exists on or data has been backed up for the ECS instance that you want to import.
 * ## Terms
 * *   **Namespace**: the logical concept that is used to isolate resources and microservices in Enterprise Distributed Application Service (EDAS). The resources include clusters, ECS instances, and applications. You can use a default or custom namespace. Each region has a default namespace and supports multiple custom namespaces. By default, only the default namespace is available. You do not need to create a custom namespace if you do not want to isolate resources or microservices.
 * *   **ECU**: After an ECS instance is imported to a cluster, the instance becomes an ECU.
 * *   **Elastic compute container (ECC)**: After you deploy an application to an ECU in a cluster, the ECU becomes an ECC.
 *
 * @param request MigrateEcuRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return MigrateEcuResponse
 */
async function migrateEcuWithOptions(request: MigrateEcuRequest, headers: map[string]string, runtime: Util.RuntimeOptions): MigrateEcuResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.instanceIds)) {
    query['InstanceIds'] = request.instanceIds;
  }
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'MigrateEcu',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/migrate_ecu`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Migrates an elastic compute unit (ECU) to the default cluster in a specified namespace.
 *
 * @description ## Limits
 * We recommend that you do not call this operation. Instead, we recommend that you call the TransformClusterMember operation. For more information, see [TransformClusterMember](https://help.aliyun.com/document_detail/71514.html).
 * When you call this operation to import an Elastic Compute Service (ECS) instance, the operating system of the ECS instance is reinstalled. After the operating system is reinstalled, all data of the ECS instance is deleted. You must set a logon password for the ECS instance. Make sure that no important data exists on or data has been backed up for the ECS instance that you want to import.
 * ## Terms
 * *   **Namespace**: the logical concept that is used to isolate resources and microservices in Enterprise Distributed Application Service (EDAS). The resources include clusters, ECS instances, and applications. You can use a default or custom namespace. Each region has a default namespace and supports multiple custom namespaces. By default, only the default namespace is available. You do not need to create a custom namespace if you do not want to isolate resources or microservices.
 * *   **ECU**: After an ECS instance is imported to a cluster, the instance becomes an ECU.
 * *   **Elastic compute container (ECC)**: After you deploy an application to an ECU in a cluster, the ECU becomes an ECC.
 *
 * @param request MigrateEcuRequest
 * @return MigrateEcuResponse
 */
async function migrateEcu(request: MigrateEcuRequest): MigrateEcuResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return migrateEcuWithOptions(request, headers, runtime);
}

model ModifyScalingRuleRequest {
  acceptEULA?: boolean(name='AcceptEULA', description='Set the value to true if scale-outs are allowed.', example='true'),
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='74ee****-db65-4322-a1f6-bcb60e5b****'),
  groupId?: string(name='GroupId', description='The ID of the instance group to which the application is deployed.

This parameter is required.', example='8123db90-880f-486f-****-************'),
  inCondition?: string(name='InCondition', description='The relationship among the conditions that trigger a scale-in.

*   OR: one of the conditions
*   AND: all conditions', example='"OR"'),
  inCpu?: int32(name='InCpu', description='The CPU utilization that triggers a scale-in.', example='50'),
  inDuration?: int32(name='InDuration', description='The duration in which the metric threshold is exceeded. Unit: minutes.', example='50'),
  inEnable?: boolean(name='InEnable', description='Specifies whether to allow scale-ins.

*   true: allows scale-ins.
*   false: does not allow scale-ins.', example='true'),
  inInstanceNum?: int32(name='InInstanceNum', description='The minimum number of instances that must be retained in each group when a scale-in is performed.', example='3'),
  inLoad?: int32(name='InLoad', description='The system load that triggers a scale-in.', example='50'),
  inRT?: int32(name='InRT', description='The minimum service latency that triggers a scale-in. The lower limit is 0. Unit: milliseconds.', example='50'),
  inStep?: int32(name='InStep', description='The number of instances that are removed during each scale-in.', example='1'),
  keyPairName?: string(name='KeyPairName', description='The key pair that is used to log on to the instance. This parameter takes effect only if you choose to create instances based on the specifications of an existing instance during a scale-out.', example='"tdy218"'),
  multiAzPolicy?: string(name='MultiAzPolicy', description='The multi-zone scaling policy. Valid values:

*   PRIORITY: The vSwitch that is first selected has the highest priority.
*   BALANCE: This policy evenly distributes instances across zones in which the vSwitches reside.', example='"PRIORITY"'),
  outCPU?: int32(name='OutCPU', description='The CPU utilization that triggers a scale-out.', example='50'),
  outCondition?: string(name='OutCondition', description='The relationship among the conditions that trigger a scale-out.

*   OR: one of the conditions
*   AND: all conditions', example='"OR"'),
  outDuration?: int32(name='OutDuration', description='The duration in which the metric threshold is exceeded. Unit: minutes.', example='50'),
  outEnable?: boolean(name='OutEnable', description='Specifies whether to allow scale-outs.', example='true'),
  outInstanceNum?: int32(name='OutInstanceNum', description='The maximum number of instances in each group when a scale-out is performed.', example='10'),
  outLoad?: int32(name='OutLoad', description='The system load that triggers a scale-out.', example='50'),
  outRT?: int32(name='OutRT', description='The minimum service latency that triggers a scale-out. The lower limit is 0. Unit: milliseconds.', example='0'),
  outStep?: int32(name='OutStep', description='The number of instances that are added during each scale-out.', example='0'),
  password?: string(name='Password', description='The password that is used to log on to the instance. This parameter takes effect only if you choose to create instances based on the specifications of an existing instance during a scale-out.', example='"Pwd*****"'),
  resourceFrom?: string(name='ResourceFrom', description='The source of the instance to be added during a scale-out. Valid values:

*   NEW: elastic resources
*   AVAILABLE: existing resources If you prefer existing resources to elastic resources, set this parameter to AVAILABLE_FIRST.

If you set this parameter to NEW or AVAILABLE_FIRST, you must specify the auto-scaling parameters. If you set this parameter to NEW, instances are created based on a launch template or the specifications of an existing instance.', example='"AVAILABLE"'),
  scalingPolicy?: string(name='ScalingPolicy', description='The instance handling mode during a scale-in. Valid values:

*   release: When a scale-in is performed, instances that are no longer used are released.
*   recycle: When a scale-in is performed, instances that are no longer used are stopped and reclaimed.', example='"release"'),
  templateId?: string(name='TemplateId', description='The ID of the launch template that is used to create instances during a scale-out. This parameter takes effect only if you set the OutEnable parameter to true. This parameter takes precedence over the TemplateInstanceId parameter.', example='"lt-wz9hkhn8wp*****"'),
  templateInstanceId?: string(name='TemplateInstanceId', description='The ID of the instance whose specifications are used to create instances during a scale-out. This parameter is valid only when you set the OutEnable parameter to true.', example='"1"'),
  templateInstanceName?: string(name='TemplateInstanceName', description='The name of the instance whose specifications are used to create instances during a scale-out. This parameter takes effect only if you specify the TemplateInstanceId parameter.', example='"tpl-tdy218"'),
  templateVersion?: int32(name='TemplateVersion', description='The version of the launch template that is used to create instances during a scale-out. This parameter takes effect only if you set the OutEnable parameter to true. To use the default template version, set this parameter to `-1`. Otherwise, set this parameter to the version that you want to use.', example='-1'),
  vSwitchIds?: string(name='VSwitchIds', description='The IDs of the vSwitches that are associated with the VPC. Separate multiple IDs with commas (,).', example='"vsw-bp1ldxs3d4fd*****"'),
  vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) that is associated with the instances created based on a launch template or the specifications of an existing instance.', example='"vpc-bp1j55oz3bg*****"'),
}

model ModifyScalingRuleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CB36E997-FE54-476C-8C0D-********'),
}

model ModifyScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyScalingRuleResponseBody(name='body'),
}

/**
 * @summary Modifies the scaling rule for an application.
 *
 * @param request ModifyScalingRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyScalingRuleResponse
 */
async function modifyScalingRuleWithOptions(request: ModifyScalingRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ModifyScalingRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.acceptEULA)) {
    query['AcceptEULA'] = request.acceptEULA;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.inCondition)) {
    query['InCondition'] = request.inCondition;
  }
  if (!Util.isUnset(request.inCpu)) {
    query['InCpu'] = request.inCpu;
  }
  if (!Util.isUnset(request.inDuration)) {
    query['InDuration'] = request.inDuration;
  }
  if (!Util.isUnset(request.inEnable)) {
    query['InEnable'] = request.inEnable;
  }
  if (!Util.isUnset(request.inInstanceNum)) {
    query['InInstanceNum'] = request.inInstanceNum;
  }
  if (!Util.isUnset(request.inLoad)) {
    query['InLoad'] = request.inLoad;
  }
  if (!Util.isUnset(request.inRT)) {
    query['InRT'] = request.inRT;
  }
  if (!Util.isUnset(request.inStep)) {
    query['InStep'] = request.inStep;
  }
  if (!Util.isUnset(request.keyPairName)) {
    query['KeyPairName'] = request.keyPairName;
  }
  if (!Util.isUnset(request.multiAzPolicy)) {
    query['MultiAzPolicy'] = request.multiAzPolicy;
  }
  if (!Util.isUnset(request.outCPU)) {
    query['OutCPU'] = request.outCPU;
  }
  if (!Util.isUnset(request.outCondition)) {
    query['OutCondition'] = request.outCondition;
  }
  if (!Util.isUnset(request.outDuration)) {
    query['OutDuration'] = request.outDuration;
  }
  if (!Util.isUnset(request.outEnable)) {
    query['OutEnable'] = request.outEnable;
  }
  if (!Util.isUnset(request.outInstanceNum)) {
    query['OutInstanceNum'] = request.outInstanceNum;
  }
  if (!Util.isUnset(request.outLoad)) {
    query['OutLoad'] = request.outLoad;
  }
  if (!Util.isUnset(request.outRT)) {
    query['OutRT'] = request.outRT;
  }
  if (!Util.isUnset(request.outStep)) {
    query['OutStep'] = request.outStep;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.resourceFrom)) {
    query['ResourceFrom'] = request.resourceFrom;
  }
  if (!Util.isUnset(request.scalingPolicy)) {
    query['ScalingPolicy'] = request.scalingPolicy;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.templateInstanceId)) {
    query['TemplateInstanceId'] = request.templateInstanceId;
  }
  if (!Util.isUnset(request.templateInstanceName)) {
    query['TemplateInstanceName'] = request.templateInstanceName;
  }
  if (!Util.isUnset(request.templateVersion)) {
    query['TemplateVersion'] = request.templateVersion;
  }
  if (!Util.isUnset(request.vSwitchIds)) {
    query['VSwitchIds'] = request.vSwitchIds;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScalingRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/scaling_rules`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the scaling rule for an application.
 *
 * @param request ModifyScalingRuleRequest
 * @return ModifyScalingRuleResponse
 */
async function modifyScalingRule(request: ModifyScalingRuleRequest): ModifyScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return modifyScalingRuleWithOptions(request, headers, runtime);
}

model QueryApplicationStatusRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='3616cdca-4f92-441**************'),
}

model QueryApplicationStatusResponseBody = {
  appInfo?: {
    application?: {
      applicationId?: string(name='ApplicationId', description='The ID of the application.', example='3616cdca-4f92-4413-****-************'),
      buildPackageId?: int32(name='BuildPackageId', description='The build package number of Enterprise Distributed Application Service (EDAS) Container.', example='0'),
      clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='0d247b93-8d62-4e34-****-************'),
      cpu?: int32(name='Cpu', description='The number of CPU cores used by the application.', example='0'),
      createTime?: long(name='CreateTime', description='The time when the application was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573626207270'),
      dockerize?: boolean(name='Dockerize', description='Indicates whether the application is a Docker application.', example='false'),
      email?: string(name='Email', description='The email address of the user who created the application.', example='1234567@qq.com'),
      healthCheckUrl?: string(name='HealthCheckUrl', description='The health check URL.', example='“”'),
      instanceCount?: int32(name='InstanceCount', description='The number of application instances.', example='1'),
      launchTime?: long(name='LaunchTime', description='The time when the application was launched. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='0'),
      memory?: int32(name='Memory', description='The memory size.', example='0'),
      name?: string(name='Name', description='The name of the application.', example='EDAS-scaled-cluster:default cluster'),
      owner?: string(name='Owner', description='The ID of the user who created the application.', example='edas_com***_****@******-*****.***'),
      phone?: string(name='Phone', description='The mobile number of the user who created the application.', example='1886666****'),
      port?: int32(name='Port', description='The port used by the application.', example='8080'),
      regionId?: string(name='RegionId', description='The ID of the namespace.', example='cn-shenzhen:test'),
      runningInstanceCount?: int32(name='RunningInstanceCount', description='The number of application instances that are running.', example='1'),
      userId?: string(name='UserId', description='The ID of the Alibaba Cloud account.', example='edas_com***_****@******-*****.***'),
    }(name='Application', description='The basic information about the application.'),
    deployRecordList?: {
      deployRecord?: [ 
      {
        createTime?: long(name='CreateTime', description='The time when the deployment record was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573626226691'),
        deployRecordId?: string(name='DeployRecordId', description='The ID of the deployment record.', example='bbc6c0d5-d792-4907-****-************'),
        eccId?: string(name='EccId', description='The unique ID of the ECC.', example='0cf49a6c-95a8-4aa8-****-************'),
        ecuId?: string(name='EcuId', description='The unique ID of the ECU.', example='07bd417a-b863-477d-****-************'),
        packageMd5?: string(name='PackageMd5', description='The MD5 hash value of the deployment package.', example='d0db5bcb442e492104d0f00e10a03dd9'),
        packageVersionId?: string(name='PackageVersionId', description='The version of the deployment package that was used to deploy an application in the instance group.', example='441beb18-da42-44dc-****-************'),
      }
    ](name='DeployRecord')
    }(name='DeployRecordList', description='The information about deployment records.'),
    eccList?: {
      ecc?: [ 
      {
        appId?: string(name='AppId', description='The ID of the application.', example='3616cdca-4f92-4413-****-************'),
        appState?: int32(name='AppState', description='The status of the application instance. Valid values:

*   0: AGENT_OFF: indicates that the agent is offline.
*   1: STOPPED: indicates that the application is stopped.
*   3: RUNNING_BUT_URL_FAILED: indicates that the health check failed.
*   7: RUNNING: indicates that the application is running.', example='7'),
        containerStatus?: string(name='ContainerStatus', description='The status of the container.', example='“”'),
        createTime?: long(name='CreateTime', description='The time when the ECC was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573626226691'),
        eccId?: string(name='EccId', description='The unique ID of the ECC.', example='0cf49a6c-95a8-4aa8-****-************'),
        ecuId?: string(name='EcuId', description='The unique ID of the ECU.', example='07bd417a-b863-477d-****-************'),
        groupId?: string(name='GroupId', description='The ID of the instance group.', example='8123db90-880f-486f-****-************'),
        ip?: string(name='Ip', description='The private IP address of the ECU.', example='172.16.*.***'),
        taskState?: int32(name='TaskState', description='The state of the latest task initiated on the application instance. Valid values:

*   0: UNKNOWN: indicates that the state of the latest task is unknown.
*   1: PROCESSING: indicates that the latest task is being processed.
*   2: SUCCESS: indicates that the latest task is executed.
*   3: FAILED: indicates that the latest task failed.', example='3'),
        updateTime?: long(name='UpdateTime', description='The time when the ECC was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573635952012'),
        vpcId?: string(name='VpcId', description='The ID of the VPC.', example='vpc-wz9b246zg************'),
      }
    ](name='Ecc')
    }(name='EccList', description='The information about elastic compute containers (ECCs).'),
    ecuList?: {
      ecu?: [ 
      {
        availableCpu?: int32(name='AvailableCpu', description='The number of available CPU cores.', example='0'),
        availableMem?: int32(name='AvailableMem', description='The size of the available memory.', example='0'),
        createTime?: long(name='CreateTime', description='The time when the ECU was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573626207270'),
        dockerEnv?: boolean(name='DockerEnv', description='Indicates whether Docker is installed.', example='false'),
        ecuId?: string(name='EcuId', description='The unique ID of the ECU. You can run the `dmidecode` command on the ECS instance to query the ECU ID.', example='07bd417a-b863-477d-****-************'),
        groupId?: string(name='GroupId', description='The ID of the group.', example='8123db90-880f-486f-****-************'),
        heartbeatTime?: long(name='HeartbeatTime', description='The time when the last heartbeat detection was performed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573635952012'),
        instanceId?: string(name='InstanceId', description='The ID of the instance.', example='i-wz9fp1ljg***********'),
        ipAddr?: string(name='IpAddr', description='The private IP address of the ECU.', example='172.16.*.**'),
        name?: string(name='Name', description='The name of the ECU.', example='EDAS-scaled-cluster: default cluster'),
        online?: boolean(name='Online', description='Indicates whether the ECU is online.', example='true'),
        regionId?: string(name='RegionId', description='The ID of the region.', example='cn-shen****-*'),
        updateTime?: long(name='UpdateTime', description='The time when the ECU was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573635952012'),
        userId?: string(name='UserId', description='The ID of the user associated with the ECU.', example='edas_com***_****@******-*****.***'),
        vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC).', example='vpc-wz9b246zg************'),
        zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-shen****-*'),
      }
    ](name='Ecu')
    }(name='EcuList', description='The information about elastic compute units (ECUs).'),
    groupList?: {
      group?: [ 
      {
        appId?: string(name='AppId', description='The ID of the application.', example='3616cdca-4f92-4413-****-************'),
        appVersionId?: string(name='AppVersionId', description='The ID of the change process for application deployment in the instance group.', example='changeorder_a**_*******_**'),
        clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='0d247b93-8d62-4e34-****-************'),
        createTime?: long(name='CreateTime', description='The time when the instance group was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573626155185'),
        groupId?: string(name='GroupId', description='The ID of the instance group.', example='8123db90-880f-486f-****-************'),
        groupName?: string(name='GroupName', description='The name of the instance group.', example='_DEFAULT_GROUP'),
        groupType?: int32(name='GroupType', description='The type of the instance group. Valid values:

*   0: default group
*   1: self-managed group
*   2: canary release group', example='0'),
        packageVersionId?: string(name='PackageVersionId', description='The version of the deployment package that was used to deploy an application in the instance group.', example='441beb18-da42-44dc-****-************'),
        updateTime?: long(name='UpdateTime', description='The time when the instance group was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1573627441388'),
      }
    ](name='Group')
    }(name='GroupList', description='The information about the instance groups.'),
  }(name='AppInfo', description='The information about the application.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-********'),
}

model QueryApplicationStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryApplicationStatusResponseBody(name='body'),
}

/**
 * @summary Queries the status of an application.
 *
 * @param request QueryApplicationStatusRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryApplicationStatusResponse
 */
async function queryApplicationStatusWithOptions(request: QueryApplicationStatusRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryApplicationStatusResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryApplicationStatus',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/app_status`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the status of an application.
 *
 * @param request QueryApplicationStatusRequest
 * @return QueryApplicationStatusResponse
 */
async function queryApplicationStatus(request: QueryApplicationStatusRequest): QueryApplicationStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryApplicationStatusWithOptions(request, headers, runtime);
}

model QueryEccInfoRequest {
  eccId?: string(name='EccId', description='The ID of the ECC.

This parameter is required.', example='b197-40ab-9155-****'),
}

model QueryEccInfoResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  eccInfo?: {
    appId?: string(name='AppId', description='The ID of the application.', example='e809****-43d7-4c6b-8e01-b0d9d1db****'),
    eccId?: string(name='EccId', description='ECC ID', example='a5b9****-40b4-4d7b-9c2a-55d6c1c0****'),
    ecuId?: string(name='EcuId', description='ECU ID', example='0d4e****-6d87-401f-ba81-13df9877****'),
    groupId?: string(name='GroupId', description='The ID of the ECC group.', example='57cd****-2d3b-496f-bcce-646d0a4d****'),
    groupName?: string(name='GroupName', description='The name of the ECC group.', example='_DEFAULT_GROUP'),
    packageMd5?: string(name='PackageMd5', description='The MD5 hash value of the deployment package version.', example='bab6****7a090e41ca9445c9b3cd****'),
    packageVersion?: string(name='PackageVersion', description='The version of the deployment package.', example='20210209.153400'),
    vpcId?: string(name='VpcId', description='VPC ID', example='vpc-23727****'),
  }(name='EccInfo', description='The information about the ECC.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
}

model QueryEccInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryEccInfoResponseBody(name='body'),
}

/**
 * @summary Queries details about an elastic compute container (ECC). This operation is applicable to Container Service for Kubernetes (ACK) clusters.
 *
 * @param request QueryEccInfoRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryEccInfoResponse
 */
async function queryEccInfoWithOptions(request: QueryEccInfoRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryEccInfoResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.eccId)) {
    query['EccId'] = request.eccId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryEccInfo',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/ecc`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries details about an elastic compute container (ECC). This operation is applicable to Container Service for Kubernetes (ACK) clusters.
 *
 * @param request QueryEccInfoRequest
 * @return QueryEccInfoResponse
 */
async function queryEccInfo(request: QueryEccInfoRequest): QueryEccInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryEccInfoWithOptions(request, headers, runtime);
}

model QueryMigrateEcuListRequest {
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the namespace.

*   The ID of a custom namespace is in the `region ID:namespace identifier` format. Example: `cn-beijing:test`.
*   The ID of the default namespace is in the `region ID` format. Example: `cn-beijing`.', example='cn-hangzhou or cn-hangzhou:test'),
}

model QueryMigrateEcuListResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  ecuEntityList?: {
    ecuEntity?: [ 
    {
      availableCpu?: int32(name='AvailableCpu', description='The number of available CPUs. Unit: cores.', example='2'),
      availableMem?: int32(name='AvailableMem', description='The size of available memory. Unit: MB.', example='2048'),
      cpu?: int32(name='Cpu', description='The CPU quota set by the system. Unit: cores. The value 0 indicates that no quota is set by the system.', example='0'),
      createTime?: long(name='CreateTime', description='The time when the ECU was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281041101'),
      dockerEnv?: boolean(name='DockerEnv', description='Indicates whether Docker is installed. Valid values:

*   true: Docker is installed.
*   false: Docker is not installed.', example='false'),
      ecuId?: string(name='EcuId', description='The unique ID of the ECU. To query the ID, you can run the `dmidecode` command on the ECS instance that corresponds to the ECU.', example='70ed3f59-b476-49aa-****-************'),
      heartbeatTime?: long(name='HeartbeatTime', description='The time when the last heartbeat detection was performed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281041101'),
      instanceId?: string(name='InstanceId', description='The ID of the ECU.', example='i-2zej4i2jd***********'),
      ipAddr?: string(name='IpAddr', description='The private IP address of the ECU.', example='192.168.0.150'),
      mem?: int32(name='Mem', description='The total size of memory.', example='0'),
      name?: string(name='Name', description='The name of the ECU.', example='product_test003'),
      online?: boolean(name='Online', description='Indicates whether the ECU is online. Valid values:

*   true: The ECU is online.
*   false: The ECU is offline.', example='true'),
      regionId?: string(name='RegionId', description='The ID of the region where the ECU resides.', example='cn-beijing'),
      updateTime?: long(name='UpdateTime', description='The time when the ECU was updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1573281041109'),
      userId?: string(name='UserId', description='The ID of the Alibaba Cloud account to which the ECU belongs.', example='edas_com***_****@******-*****.***'),
      vpcId?: string(name='VpcId', description='VPC ID', example='vpc-2zef6ob8m************'),
      zoneId?: string(name='ZoneId', description='The ID of the zone where the ECU resides.', example='cn-bei****-*'),
    }
  ](name='EcuEntity')
  }(name='EcuEntityList', description='The information about ECUs that can be migrated.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
}

model QueryMigrateEcuListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMigrateEcuListResponseBody(name='body'),
}

/**
 * @summary Queries the elastic compute units (ECUs) that can be migrated.
 *
 * @param request QueryMigrateEcuListRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMigrateEcuListResponse
 */
async function queryMigrateEcuListWithOptions(request: QueryMigrateEcuListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryMigrateEcuListResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryMigrateEcuList',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/migrate_ecu_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the elastic compute units (ECUs) that can be migrated.
 *
 * @param request QueryMigrateEcuListRequest
 * @return QueryMigrateEcuListResponse
 */
async function queryMigrateEcuList(request: QueryMigrateEcuListRequest): QueryMigrateEcuListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryMigrateEcuListWithOptions(request, headers, runtime);
}

model QueryMigrateRegionListRequest {
  logicalRegionId?: string(name='LogicalRegionId', description='The ID of the namespace.', example='cn-hangzhou:test'),
}

model QueryMigrateRegionListResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  regionEntityList?: {
    regionEntity?: [ 
    {
      regionName?: string(name='RegionName', description='The name of the namespace.', example='Beta'),
      regionNo?: string(name='RegionNo', description='The ID of the namespace.', example='cn-beijing:beta'),
    }
  ](name='RegionEntity')
  }(name='RegionEntityList', description='The namespaces.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
}

model QueryMigrateRegionListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMigrateRegionListResponseBody(name='body'),
}

/**
 * @summary Queries the namespaces to which an instance can be migrated.
 *
 * @param request QueryMigrateRegionListRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMigrateRegionListResponse
 */
async function queryMigrateRegionListWithOptions(request: QueryMigrateRegionListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryMigrateRegionListResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.logicalRegionId)) {
    query['LogicalRegionId'] = request.logicalRegionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryMigrateRegionList',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/migrate_region_select`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the namespaces to which an instance can be migrated.
 *
 * @param request QueryMigrateRegionListRequest
 * @return QueryMigrateRegionListResponse
 */
async function queryMigrateRegionList(request: QueryMigrateRegionListRequest): QueryMigrateRegionListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryMigrateRegionListWithOptions(request, headers, runtime);
}

model QueryRegionConfigResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  regionConfig?: {
    addressServerHost?: string(name='AddressServerHost', description='The domain name of Address Server.', example='****.edas.aliyun.com'),
    agentInstallScript?: string(name='AgentInstallScript', description='The installation path of the script for EDAS Agent.', example='http://edas-qd.oss-cn-****-internal.aliyuncs.com/****sh'),
    fileServerConfig?: {
      bucket?: string(name='Bucket', description='The Object Storage Service (OSS) bucket of the file server.', example='edas-bj'),
      internalUrl?: string(name='InternalUrl', description='The internal endpoint of the file server.', example='oss-cn-beijing-****.aliyuncs.com'),
      publicUrl?: string(name='PublicUrl', description='The public endpoint of the file server.', example='oss-cn-beijing.aliyuncs.com'),
      vpcUrl?: string(name='VpcUrl', description='The virtual private cloud (VPC) endpoint of the file server.', example='v*****-oss-cn-beijing.aliyuncs.com'),
    }(name='FileServerConfig', description='The information about the file server.'),
    fileServerType?: string(name='FileServerType', description='The type of the file server.', example='oss'),
    id?: string(name='Id', description='The configured ID of the region.', example='cn-beijing'),
    imageId?: string(name='ImageId', description='The ID of the official image.', example='m-2zea4hx8f9zxqah2****'),
    name?: string(name='Name', description='The configured name of the region.', example='China (Beijing)'),
    no?: int32(name='No', description='The serial number of the region. This parameter is deprecated.', example='1'),
    tag?: string(name='Tag', description='The tag of the region. The value is fixed to `ALIYUN_SHARE`.', example='ALIYUN_SHARE'),
  }(name='RegionConfig', description='The information about region configurations.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-7ca7'),
}

model QueryRegionConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryRegionConfigResponseBody(name='body'),
}

/**
 * @summary Queries the configurations of different regions that are supported by Enterprise Distributed Application Service (EDAS).
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryRegionConfigResponse
 */
async function queryRegionConfigWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): QueryRegionConfigResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'QueryRegionConfig',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/region_config`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configurations of different regions that are supported by Enterprise Distributed Application Service (EDAS).
 *
 * @return QueryRegionConfigResponse
 */
async function queryRegionConfig(): QueryRegionConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryRegionConfigWithOptions(headers, runtime);
}

model QuerySlsLogStoreListRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='af58edcf-f7eb-****-****-db4e425f****'),
  currentPage?: int32(name='CurrentPage', description='The number of the page to return. Pages start from Page 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='1000'),
  type?: string(name='Type', description='The type of data that is collected by Log Service. Valid values:

*   file: the file type
*   stdout: the standard output type

This parameter is required.', example='file'),
}

model QuerySlsLogStoreListResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='d6834ee9-5045-*************'),
  result?: [ 
    {
      consumerSide?: string(name='ConsumerSide', description='The type of the logging service.', example='Log Service'),
      createTime?: string(name='CreateTime', description='The time when the logging service was created.', example='2020-05-18 22:08:46'),
      link?: string(name='Link', description='The URL of the logging service.', example='https://sls.console.aliyun.com/lognext/project/k8s-log-c846f28edbd1d4c6aa9d78c0e********/logsearch/thisisiss'),
      logstore?: string(name='Logstore', description='The name of the Logstore.', example='thisisatestlogstore'),
      project?: string(name='Project', description='The name of the project.', example='k8s-log-c846f28edbd1d4c6aa9d78c0e********'),
      source?: string(name='Source', description='The source of logs. Valid values:

*   Standard output: stdout.log
*   File log: the directory that stores logs', example='/var/log/*'),
    }
  ](name='Result', description='The configurations of Log Service for the application.'),
  totalSize?: int32(name='TotalSize', description='The number of log sources configured for the application.', example='1'),
}

model QuerySlsLogStoreListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QuerySlsLogStoreListResponseBody(name='body'),
}

/**
 * @summary Queries the configuration details of Log Service for an application.
 *
 * @param request QuerySlsLogStoreListRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QuerySlsLogStoreListResponse
 */
async function querySlsLogStoreListWithOptions(request: QuerySlsLogStoreListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QuerySlsLogStoreListResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QuerySlsLogStoreList',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/sls/query_sls_log_store_list`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configuration details of Log Service for an application.
 *
 * @param request QuerySlsLogStoreListRequest
 * @return QuerySlsLogStoreListResponse
 */
async function querySlsLogStoreList(request: QuerySlsLogStoreListRequest): QuerySlsLogStoreListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return querySlsLogStoreListWithOptions(request, headers, runtime);
}

model ResetApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-4f92*********'),
  eccInfo?: string(name='EccInfo', description='The ID of the elastic compute container (ECC) for which you want to reset the application. Separate multiple ECC IDs with commas (,). You can call the QueryApplicationStatus operation to query the ECC ID. For more information, see [QueryApplicationStatus](https://help.aliyun.com/document_detail/149394.html).

This parameter is required.', example='0cf49a6c-***********'),
}

model ResetApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process for this operation. You can call the GetChangeOrderInfo operation to query the progress of this operation. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).', example='1c66548e-a082-40************'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-*********'),
}

model ResetApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResetApplicationResponseBody(name='body'),
}

/**
 * @summary Resets an application.
 *
 * @param request ResetApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResetApplicationResponse
 */
async function resetApplicationWithOptions(request: ResetApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ResetApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.eccInfo)) {
    query['EccInfo'] = request.eccInfo;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResetApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_reset`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Resets an application.
 *
 * @param request ResetApplicationRequest
 * @return ResetApplicationResponse
 */
async function resetApplication(request: ResetApplicationRequest): ResetApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return resetApplicationWithOptions(request, headers, runtime);
}

model RestartApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='c627c157-560d*******'),
  eccInfo?: string(name='EccInfo', description='The ID of the elastic compute container (ECC) that corresponds to the ECS instance on which you want to restart the application. You can call the QueryApplicationStatus operation to query the ECC ID. For more information, see [QueryApplicationStatus](https://help.aliyun.com/document_detail/149394.html).

*   Separate multiple ECC IDs with commas (,).
*   If you leave this parameter empty, the application will be restarted on all the ECS instances deployed with the application.', example='006c0ea5-5f8d-4398-af1e-**********'),
}

model RestartApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.

You can call the GetChangeOrderInfo operation to query the progress of this restart. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).', example='a9557bac-ddd7-*********************'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-****************'),
}

model RestartApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RestartApplicationResponseBody(name='body'),
}

/**
 * @summary Restarts an application. This operation is applicable to applications that are deployed in Elastic Compute Service (ECS) clusters.
 *
 * @param request RestartApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RestartApplicationResponse
 */
async function restartApplicationWithOptions(request: RestartApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RestartApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.eccInfo)) {
    query['EccInfo'] = request.eccInfo;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RestartApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_restart`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Restarts an application. This operation is applicable to applications that are deployed in Elastic Compute Service (ECS) clusters.
 *
 * @param request RestartApplicationRequest
 * @return RestartApplicationResponse
 */
async function restartApplication(request: RestartApplicationRequest): RestartApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return restartApplicationWithOptions(request, headers, runtime);
}

model RestartK8sApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='93fdd228-********ed2ae98de18d'),
  timeout?: int32(name='Timeout', description='The timeout period of the change process. Unit: seconds.', example='60'),
}

model RestartK8sApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='*********-ed2ae98de18d'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='03FD1520-0FD6-436A-****-265318D7****'),
}

model RestartK8sApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RestartK8sApplicationResponseBody(name='body'),
}

/**
 * @summary Restarts an application that is deployed in a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster.
 *
 * @param request RestartK8sApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RestartK8sApplicationResponse
 */
async function restartK8sApplicationWithOptions(request: RestartK8sApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RestartK8sApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.timeout)) {
    query['Timeout'] = request.timeout;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RestartK8sApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/restart_k8s_app`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Restarts an application that is deployed in a Container Service for Kubernetes (ACK) cluster or a serverless Kubernetes cluster.
 *
 * @param request RestartK8sApplicationRequest
 * @return RestartK8sApplicationResponse
 */
async function restartK8sApplication(request: RestartK8sApplicationRequest): RestartK8sApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return restartK8sApplicationWithOptions(request, headers, runtime);
}

model RetryChangeOrderTaskRequest {
  retryStatus?: boolean(name='RetryStatus', description='The retry status.', example='true'),
  taskId?: string(name='TaskId', description='The ID of the process.

This parameter is required.', example='823-bhjf-23u4-eiuf*'),
}

model RetryChangeOrderTaskResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='The retry information.', example='success retry task'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-eiufh'),
}

model RetryChangeOrderTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RetryChangeOrderTaskResponseBody(name='body'),
}

/**
 * @summary Retries a failed process.
 *
 * @param request RetryChangeOrderTaskRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RetryChangeOrderTaskResponse
 */
async function retryChangeOrderTaskWithOptions(request: RetryChangeOrderTaskRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RetryChangeOrderTaskResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.retryStatus)) {
    query['RetryStatus'] = request.retryStatus;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RetryChangeOrderTask',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/task_retry`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Retries a failed process.
 *
 * @param request RetryChangeOrderTaskRequest
 * @return RetryChangeOrderTaskResponse
 */
async function retryChangeOrderTask(request: RetryChangeOrderTaskRequest): RetryChangeOrderTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return retryChangeOrderTaskWithOptions(request, headers, runtime);
}

model RollbackApplicationRequest {
  appId?: string(name='AppId', description='The application ID. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/423162.html).

This parameter is required.', example='3616cdca-4f92-4413-************'),
  batch?: int32(name='Batch', description='The number of batches for the rollback. Default value: 1. Valid values: 1 to 5.', example='1'),
  batchWaitTime?: int32(name='BatchWaitTime', description='The wait time between batches. Default value: 0. The default value indicates no wait time. Valid values: 0 to 5. Unit: minutes.', example='0'),
  groupId?: string(name='GroupId', description='The application group ID. You can call the ListDeployGroup operation to query the application group ID. For more information, see [ListDeployGroup](https://help.aliyun.com/document_detail/423184.html).

If you need to roll back the application in all application groups, set this parameter to `all`.

This parameter is required.', example='8123db90-880f-48***************'),
  historyVersion?: string(name='HistoryVersion', description='The historical version to which you want to roll back the application. Call the ListHistoryDeployVersion operation to query the historical versions of the application. Then, set this parameter based on the returned value of `PackageVersion`. For more information, see [ListHistoryDeployVersion](https://help.aliyun.com/document_detail/423163.html).

This parameter is required.', example='2019-11-13 14:22:22'),
}

model RollbackApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The change process ID. You can call the GetChangeOrderInfo operation to query the progress of this rollback. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/423155.html).', example='921026b8-d1be-************'),
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='success'),
  requestId?: string(name='RequestId', description='The request ID.', example='D16979DC-4D42-*********'),
}

model RollbackApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RollbackApplicationResponseBody(name='body'),
}

/**
 * @summary Rolls back an application.
 *
 * @param request RollbackApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RollbackApplicationResponse
 */
async function rollbackApplicationWithOptions(request: RollbackApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RollbackApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.batch)) {
    query['Batch'] = request.batch;
  }
  if (!Util.isUnset(request.batchWaitTime)) {
    query['BatchWaitTime'] = request.batchWaitTime;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.historyVersion)) {
    query['HistoryVersion'] = request.historyVersion;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RollbackApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_rollback`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Rolls back an application.
 *
 * @param request RollbackApplicationRequest
 * @return RollbackApplicationResponse
 */
async function rollbackApplication(request: RollbackApplicationRequest): RollbackApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return rollbackApplicationWithOptions(request, headers, runtime);
}

model RollbackChangeOrderRequest {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.

This parameter is required.', example='dc5133d7-773f-4c81-****-e2103dce****'),
}

model RollbackChangeOrderResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='4f40e616-cdcd-4250-a018-efd4599c****'),
  }(name='Data', description='The information about the change process.'),
  errorCode?: string(name='ErrorCode', description='The error code that is returned.', example='success'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='B909AB1F-3763-4963-B1CE-0BDFA192****'),
  traceId?: string(name='TraceId', description='The ID of the trace.', example='000000000000000000000000000000'),
}

model RollbackChangeOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RollbackChangeOrderResponseBody(name='body'),
}

/**
 * @summary Terminates an application change process and rolls back the application. This operation is applicable to applications that are deployed in Elastic Compute Service (ECS) clusters.
 *
 * @param request RollbackChangeOrderRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RollbackChangeOrderResponse
 */
async function rollbackChangeOrderWithOptions(request: RollbackChangeOrderRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RollbackChangeOrderResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.changeOrderId)) {
    query['ChangeOrderId'] = request.changeOrderId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RollbackChangeOrder',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/oam/changeorder/rollback`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Terminates an application change process and rolls back the application. This operation is applicable to applications that are deployed in Elastic Compute Service (ECS) clusters.
 *
 * @param request RollbackChangeOrderRequest
 * @return RollbackChangeOrderResponse
 */
async function rollbackChangeOrder(request: RollbackChangeOrderRequest): RollbackChangeOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return rollbackChangeOrderWithOptions(request, headers, runtime);
}

model ScaleInApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-4f92-44***********************'),
  eccInfo?: string(name='EccInfo', description='The ID of the elastic compute container (ECC) that corresponds to the Elastic Compute Service (ECS) instance to be removed for the application. Separate multiple ECC IDs with commas (,). You can call the QueryApplicationStatus operation to query the ECC ID. For more information, see [QueryApplicationStatus](https://help.aliyun.com/document_detail/149394.html).

This parameter is required.', example='7040f221-42df-48e8-9*******************'),
  forceStatus?: boolean(name='ForceStatus', description='Specifies whether to forcibly unpublish the application from the ECS instance. You need to set this parameter to true only if the ECS instance expires. In normal cases, you do not need to set this parameter to true.', example='false'),
}

model ScaleInApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process for this operation. You can call the GetChangeOrderInfo operation to query the progress of this scale-in. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html). No ID is generated if the ForceStatus parameter is set to true. You can check whether the request is successful based on the value of the Code parameter.', example='ddf5a4c7-a507-4a6e****************'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
}

model ScaleInApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScaleInApplicationResponseBody(name='body'),
}

/**
 * @summary Scales in an application.
 *
 * @param request ScaleInApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScaleInApplicationResponse
 */
async function scaleInApplicationWithOptions(request: ScaleInApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ScaleInApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.eccInfo)) {
    query['EccInfo'] = request.eccInfo;
  }
  if (!Util.isUnset(request.forceStatus)) {
    query['ForceStatus'] = request.forceStatus;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ScaleInApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_scale_in`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Scales in an application.
 *
 * @param request ScaleInApplicationRequest
 * @return ScaleInApplicationResponse
 */
async function scaleInApplication(request: ScaleInApplicationRequest): ScaleInApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return scaleInApplicationWithOptions(request, headers, runtime);
}

model ScaleK8sApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='23bf94d9-****-4994-****-616a827aa777'),
  replicas?: int32(name='Replicas', description='The expected number of application instances after the scale-out or scale-in. The minimum number is 0.

This parameter is required.', example='2'),
  timeout?: int32(name='Timeout', description='The timeout period of the change process. Unit: seconds.', example='60'),
}

model ScaleK8sApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process. You can call the GetChangeOrderInfo operation to query the progress of this scaling operation. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).', example='9d7232b2-****-****-b9d9-7e17695779ab'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
}

model ScaleK8sApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScaleK8sApplicationResponseBody(name='body'),
}

/**
 * @summary Scales out or in an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request ScaleK8sApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScaleK8sApplicationResponse
 */
async function scaleK8sApplicationWithOptions(request: ScaleK8sApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ScaleK8sApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.replicas)) {
    query['Replicas'] = request.replicas;
  }
  if (!Util.isUnset(request.timeout)) {
    query['Timeout'] = request.timeout;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ScaleK8sApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_apps`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Scales out or in an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request ScaleK8sApplicationRequest
 * @return ScaleK8sApplicationResponse
 */
async function scaleK8sApplication(request: ScaleK8sApplicationRequest): ScaleK8sApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return scaleK8sApplicationWithOptions(request, headers, runtime);
}

model ScaleOutApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application that you want to scale out. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-4f92-4413*****************'),
  deployGroup?: string(name='DeployGroup', description='The ID of the instance group where the application you want to scale out is deployed. You can call the QueryApplicationStatus operation to query the group ID. For more information, see [QueryApplicationStatus](https://help.aliyun.com/document_detail/149394.html).

This parameter is required.', example='4f1fb6f5-6769-4bd6******************'),
  ecuInfo?: string(name='EcuInfo', description='The ID of the elastic compute unit (ECU) that corresponds to the Elastic Compute Service (ECS) instance to be added to the instance group for scale-out. You can call the ListScaleOutEcu operation to query the ECU ID. For more information, see [ListScaleOutEcu](https://help.aliyun.com/document_detail/149371.html). Separate multiple ECU IDs with commas (,).

This parameter is required.', example='8123db90-880f-486f-b***************'),
}

model ScaleOutApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process. You can call the GetChangeOrderInfo operation to query the progress of this scale-out. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).', example='f4208118-7171-4e20-92************'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-***********************'),
}

model ScaleOutApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScaleOutApplicationResponseBody(name='body'),
}

/**
 * @summary Scales out an application.
 *
 * @param request ScaleOutApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScaleOutApplicationResponse
 */
async function scaleOutApplicationWithOptions(request: ScaleOutApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ScaleOutApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.deployGroup)) {
    query['DeployGroup'] = request.deployGroup;
  }
  if (!Util.isUnset(request.ecuInfo)) {
    query['EcuInfo'] = request.ecuInfo;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ScaleOutApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_scale_out`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Scales out an application.
 *
 * @param request ScaleOutApplicationRequest
 * @return ScaleOutApplicationResponse
 */
async function scaleOutApplication(request: ScaleOutApplicationRequest): ScaleOutApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return scaleOutApplicationWithOptions(request, headers, runtime);
}

model ScaleoutApplicationWithNewInstancesRequest {
  appId?: string(name='AppId', description='The ID of the application that you want to scale out. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='e370c17f-*****-3df0721a327'),
  autoRenew?: boolean(name='AutoRenew', description='Specifies whether to enable auto-renewal. This parameter takes effect only when the InstanceChargeType parameter is set to PrePaid. Valid values:

*   true: enables auto-renewal.
*   false: does not enable auto-renewal. This is the default value.', example='true'),
  autoRenewPeriod?: int32(name='AutoRenewPeriod', description='The auto-renewal period. Valid values:

*   If the InstanceChargePeriodUnit parameter is set to Week, the valid values of the AutoRenewPeriod parameter are 1, 2, and 3.
*   If the InstanceChargePeriodUnit parameter is set to Month, the valid values of the AutoRenewPeriod parameter are 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.', example='1'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster to which you want to add ECS instances. If the application and application instance group for the scale-out are specified, this parameter is ignored.', example='e37**********-33df0721a327'),
  groupId?: string(name='GroupId', description='The ID of the instance group that you want to scale out. You can call the ListDeployGroup operation to query the group ID. For more information, see [ListDeployGroup](https://help.aliyun.com/document_detail/62077.html).', example='e37**********-33df0721a327'),
  instanceChargePeriod?: int32(name='InstanceChargePeriod', description='The duration of the subscription. The unit of the subscription duration is specified by the InstanceChargePeriodUnit parameter. This parameter takes effect only when the InstanceChargeType parameter is set to PrePaid.

*   If the InstanceChargePeriodUnit parameter is set to Week, the valid values of the InstanceChargePeriod parameter are 1, 2, 3, and 4.
*   If the InstanceChargePeriodUnit parameter is set to Month, the valid values of the InstanceChargePeriod parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.', example='1'),
  instanceChargePeriodUnit?: string(name='InstanceChargePeriodUnit', description='The unit of the subscription period. Valid values:

*   Week: billed on a weekly basis.
*   Month: billed on a monthly basis. This is the default value.', example='Month'),
  instanceChargeType?: string(name='InstanceChargeType', description='The billing method of the instance. Valid values:

*   PrePaid: subscription.
*   PostPaid: pay-as-you-go. This is the default value.', example='PrePaid'),
  scalingNum?: int32(name='ScalingNum', description='The number of instances to be added for the scale-out.

This parameter is required.', example='2'),
  scalingPolicy?: string(name='ScalingPolicy', description='The instance reclaim mode of the scaling group. Valid values:

*   recycle: economical mode
*   release: release mode

For more information about how to remove instances from a specified scaling group, see [RemoveInstances](https://help.aliyun.com/document_detail/25955.html).', example='release'),
  templateId?: string(name='TemplateId', description='The ID of the ECS instance launch template. You can call the DescribeLaunchTemplates operation to query the launch template ID. For more information, see [DescribeLaunchTemplates](https://help.aliyun.com/document_detail/73759.html).', example='lt-****hy9s2'),
  templateInstanceId?: string(name='TemplateInstanceId', description='The ID of the existing ECS instance used for the scale-out. If this parameter is specified, the specifications and configurations of the specified ECS instance are used as a template to purchase new instances.', example='i-28wt4****'),
  templateVersion?: string(name='TemplateVersion', description='The version of the ECS instance launch template. You can call the DescribeLaunchTemplateVersions operation to query the launch template version. For more information, see [DescribeLaunchTemplateVersions](https://help.aliyun.com/document_detail/73761.html).

> If you set this parameter to `-1`, the default launch template version is used.', example='-1'),
}

model ScaleoutApplicationWithNewInstancesResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process for the scale-out.', example='e370c17f-*****-3df0721a327'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  instanceIds?: [ string ](name='InstanceIds', description='The IDs of ECS instances.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='e370c17f-*****-3df0721a327'),
}

model ScaleoutApplicationWithNewInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScaleoutApplicationWithNewInstancesResponseBody(name='body'),
}

/**
 * @summary Purchases Elastic Compute Service (ECS) instances in the Enterprise Distributed Application Service (EDAS) console and adds the purchased ECS instances to the specified instance group of an application.
 *
 * @description ## Limits
 * Assume that the auto scaling feature is configured and enabled for an application. When an auto scale-in is triggered for the application, the ECS instances that are purchased by calling this operation are removed first.
 *
 * @param request ScaleoutApplicationWithNewInstancesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScaleoutApplicationWithNewInstancesResponse
 */
async function scaleoutApplicationWithNewInstancesWithOptions(request: ScaleoutApplicationWithNewInstancesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ScaleoutApplicationWithNewInstancesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!Util.isUnset(request.autoRenewPeriod)) {
    query['AutoRenewPeriod'] = request.autoRenewPeriod;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.instanceChargePeriod)) {
    query['InstanceChargePeriod'] = request.instanceChargePeriod;
  }
  if (!Util.isUnset(request.instanceChargePeriodUnit)) {
    query['InstanceChargePeriodUnit'] = request.instanceChargePeriodUnit;
  }
  if (!Util.isUnset(request.instanceChargeType)) {
    query['InstanceChargeType'] = request.instanceChargeType;
  }
  if (!Util.isUnset(request.scalingNum)) {
    query['ScalingNum'] = request.scalingNum;
  }
  if (!Util.isUnset(request.scalingPolicy)) {
    query['ScalingPolicy'] = request.scalingPolicy;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.templateInstanceId)) {
    query['TemplateInstanceId'] = request.templateInstanceId;
  }
  if (!Util.isUnset(request.templateVersion)) {
    query['TemplateVersion'] = request.templateVersion;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ScaleoutApplicationWithNewInstances',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/scaling/scale_out`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Purchases Elastic Compute Service (ECS) instances in the Enterprise Distributed Application Service (EDAS) console and adds the purchased ECS instances to the specified instance group of an application.
 *
 * @description ## Limits
 * Assume that the auto scaling feature is configured and enabled for an application. When an auto scale-in is triggered for the application, the ECS instances that are purchased by calling this operation are removed first.
 *
 * @param request ScaleoutApplicationWithNewInstancesRequest
 * @return ScaleoutApplicationWithNewInstancesResponse
 */
async function scaleoutApplicationWithNewInstances(request: ScaleoutApplicationWithNewInstancesRequest): ScaleoutApplicationWithNewInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return scaleoutApplicationWithNewInstancesWithOptions(request, headers, runtime);
}

model StartApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='3616cdca-4f92-4413**********'),
  eccInfo?: string(name='EccInfo', description='The ID of the elastic compute container (ECC) that corresponds to the Elastic Compute Service (ECS) instance on which you want to start the application. Separate multiple ECC IDs with commas (,). You can call the QueryApplicationStatus operation to query the ECC ID. For more information, see [QueryApplicationStatus](https://help.aliyun.com/document_detail/149394.html).', example='""'),
}

model StartApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process for this operation. You can call the GetChangeOrderInfo operation to query the progress of this startup. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).', example='426d3328-11a***************'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-**************'),
}

model StartApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartApplicationResponseBody(name='body'),
}

/**
 * @summary Starts an application.
 *
 * @param request StartApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartApplicationResponse
 */
async function startApplicationWithOptions(request: StartApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StartApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.eccInfo)) {
    query['EccInfo'] = request.eccInfo;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_start`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Starts an application.
 *
 * @param request StartApplicationRequest
 * @return StartApplicationResponse
 */
async function startApplication(request: StartApplicationRequest): StartApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return startApplicationWithOptions(request, headers, runtime);
}

model StartK8sAppPrecheckRequest {
  annotations?: string(name='Annotations', description='The annotation of an application pod.', example='{"annotation-name-1":"annotation-value-1","annotation-name-2":"annotation-value-2"}'),
  appId?: string(name='AppId', description='The ID of the application.', example='af58edcf-f7eb-****-****-db4e425f****'),
  appName?: string(name='AppName', description='The name of the application. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 36 characters in length.', example='testapp'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='c37aec2a-bcca-4ec1-****-****'),
  componentIds?: string(name='ComponentIds', description='The ID of the application component. You can call the ListComponents operation to query application components. This parameter must be specified when the application runs in Apache Tomcat or in a standard Java application runtime environment. The Apache Tomcat application runtime environment is applicable to Dubbo applications that are deployed by using WAR packages. A standard Java application runtime environment is applicable to Spring Boot or Spring Cloud applications that are deployed by using JAR packages.

Valid values for regular application component IDs:

*   4: Apache Tomcat 7.0.91
*   5: OpenJDK 1.8.x
*   6: OpenJDK 1.7.x
*   7: Apache Tomcat 8.5.42

This parameter is available only for Java SDK 2.57.3 or later, or Python SDK 2.57.3 or later. Assume that you use an SDK that is not provided by Enterprise Distributed Application Service (EDAS), such as aliyun-python-sdk-core, aliyun-java-sdk-core, and Alibaba Cloud CLI. In this case, you can directly specify this parameter.', example='7'),
  configMountDescs?: string(name='ConfigMountDescs', description='The configuration for mounting a Kubernetes ConfigMap or Secret to a directory in an elastic container instance. The following parameters are included in the configuration:

*   name: the name of the Kubernetes ConfigMap or Secret.
*   type: the type of the API object that you want to mount. You can mount a Kubernetes ConfigMap or Secret.
*   mountPath: the mount path. The mount path must be an absolute path that starts with a forward slash (/).', example='[{"name":"nginx-config","type":"ConfigMap","mountPath":"/etc/nginx"},{"name":"tls-secret","type":"secret","mountPath":"/etc/ssh"}]'),
  emptyDirs?: string(name='EmptyDirs', description='The configuration for mounting a Kubernetes emptyDir volume to a directory in an elastic container instance. The following parameters are included in the configuration:

*   mountPath: The mount path in the container. This parameter is required.
*   readOnly: (Optional) The mount mode. The value true indicates the read-only mode. The value false indicates the read and write mode. Default value: false.
*   subPathExpr: (Optional) The regular expression that is used to match the subdirectory.', example='[{"mountPath":"/app-log","subPathExpr":"$(POD_IP)"},{"readOnly":true,"mountPath":"/etc/nginx"}]'),
  envFroms?: string(name='EnvFroms', description='The Kubernetes environment variables that are configured in EnvFrom mode. A ConfigMap or Secret is mounted to a directory. Each key corresponds to a file in the directory, and the content of the file is the value of the key.

The following parameters are included in the configuration of the EnvFroms parameter:

*   configMapRef: the ConfigMap that is referenced. The following parameter is included:

    name: the name of the ConfigMap.

*   secretRef: the Secret that is referenced. The following parameter is included:

    name: the name of the Secret.', example='[{"name":"appname","valueFrom":{"configMapKeyRef":{"name":"appconf","key":"name"}}}]'),
  envs?: string(name='Envs', description='The environment variables that are used to deploy the application. The value must be a JSON array. Valid values: regular environment variables, Kubernetes ConfigMap environment variables, and Kubernetes Secret environment variables. Specify regular environment variables in the following format:

`{"name":"x", "value": "y"}`

Specify Kubernetes ConfigMap environment variables in the following format to reference values from ConfigMaps:

`{ "name": "x2", "valueFrom": { "configMapKeyRef": { "name": "my-config", "key": "y2" } } }`

Specify Kubernetes Secret environment variables in the following format to reference values from Secrets:

`{ "name": "x3", "valueFrom": { "secretKeyRef": { "name": "my-secret", "key": "y3" } } }`

> If you want to cancel this configuration, set this parameter to an empty JSON array, which is in the format of "[]".', example='[{"name":"x1","value":"y1"},{"name":"x2","valueFrom":{"configMapKeyRef":{"name":"my-config","key":"y2"}}},{"name":"x3","valueFrom":{"secretKeyRef":{"name":"my-secret","key":"y3"}}}]'),
  imageUrl?: string(name='ImageUrl', description='The URL of the image.', example='registry.cn-hangzhou.aliyuncs.com/mw/testapp:latest'),
  javaStartUpConfig?: string(name='JavaStartUpConfig', description='The configuration of Java startup parameters for a Java application. These startup parameters involve the memory, application, garbage collection (GC) policy, tools, service registration and discovery, and custom configurations. Proper parameter settings help reduce the GC overheads, shorten the server response time, and improve the throughput. Set this parameter to a JSON string. In the example, original indicates the configuration value, and startup indicates a startup parameter. The system automatically concatenates all startup values as the settings of Java startup parameters for the application. To delete this configuration, leave the parameter value empty by entering `""` or `"{}"`. The following parameters are included in the configuration:

*   InitialHeapSize: the initial size of the heap memory.
*   MaxHeapSize: the maximum size of the heap memory.
*   CustomParams: the custom parameters, such as JVM -D parameters.
*   Other parameters: You can view the JSON structure submitted by the frontend.', example='{"InitialHeapSize":{"original":512,"startup":"-Xms512m"},"MaxHeapSize":{"original":1024,"startup":"-Xmx1024m"}}'),
  labels?: string(name='Labels', description='The label of an application pod.', example='{"label-name-1":"label-value-1","label-name-2":"label-value-2"}'),
  limitEphemeralStorage?: int32(name='LimitEphemeralStorage', description='The maximum size of space required by ephemeral storage. Unit: GB. The value 0 indicates that no limit is set on the ephemeral storage space.', example='4'),
  limitMem?: int32(name='LimitMem', description='The maximum size of memory allowed for each application instance when the application is running. Unit: MB. The value of LimitMem must be greater than or equal to that of RequestsMem.', example='4096'),
  limitmCpu?: int32(name='LimitmCpu', description='The maximum number of CPU cores allowed for each application instance when the application is running. Unit: millicores. The value 0 indicates that no limit is set on CPU cores.', example='1000'),
  localVolume?: string(name='LocalVolume', description='The configurations that are used when the host files are mounted to the container on which the application is running. Example: `[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}\\\\]`. Description:

*   `nodePath`: the host path.
*   `mountPath`: the path in the container.
*   `type`: the mounting type.', example='[{"type":"","nodePath":"/localfiles","mountPath":"/app/files"},{"type":"Directory","nodePath":"/mnt","mountPath":"/app/storage"}]'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster. This parameter specifies the Kubernetes namespace in which your application is deployed. By default, the default namespace is used.

This parameter is required.', example='default'),
  packageUrl?: string(name='PackageUrl', description='The URL of the deployment package.', example='https://e***.oss-cn-beijing.aliyuncs.com/s***-1.0-SNAPSHOT-spring-boot.jar'),
  pvcMountDescs?: string(name='PvcMountDescs', description='The configuration for mounting a Kubernetes PersistentVolumeClaim (PVC) to a directory in an elastic container instance. The following parameters are included in the configuration:

*   pvcName: the name of the PVC. Make sure that the volume exists and is in the Bound state.

*   mountPaths: the directory to which you want to mount the PVC. You can configure multiple directories. You can set the following two parameters for each mount directory:

    *   mountPath: the mount path. The mount path must be an absolute path that starts with a forward slash (/).
    *   readOnly: the mount mode. The value true indicates the read-only mode. The value false indicates the read and write mode. Default value: false.', example='[{"pvcName":"nas-pvc-1","mountPaths":[{"mountPath":"/usr/share/nginx/data"},{"mountPath":"/usr/share/nginx/html","readOnly":true}]}]'),
  regionId?: string(name='RegionId', description='The ID of the region.', example='cn-hangzhou'),
  replicas?: int32(name='Replicas', description='The number of application instances.', example='2'),
  requestsEphemeralStorage?: int32(name='RequestsEphemeralStorage', description='The minimum size of space required by ephemeral storage. Unit: GB. The value 0 indicates that no limit is set on the ephemeral storage space.', example='2'),
  requestsMem?: int32(name='RequestsMem', description='The maximum size of memory allowed for each application instance when the application is created. Unit: MB. The value 0 indicates that no limit is set on the memory size. The value of RequestsMem cannot be greater than that of LimitMem.', example='1024'),
  requestsmCpu?: int32(name='RequestsmCpu', description='The maximum number of CPU cores allowed for each application instance when the application is created. Unit: millicores.', example='500'),
}

model StartK8sAppPrecheckResponseBody = {
  code?: int32(name='Code', description='The HTTP status code.', example='200'),
  data?: {
    jobs?: [ string ](name='Jobs', description='The jobs and the details about the jobs.'),
  }(name='Data', description='The returned data.'),
  message?: string(name='Message', description='The returned message.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='7638276F-****-****-884F-54CC0BC84A8D'),
}

model StartK8sAppPrecheckResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartK8sAppPrecheckResponseBody(name='body'),
}

/**
 * @summary Starts precheck for Kubernetes application changes.
 *
 * @param request StartK8sAppPrecheckRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartK8sAppPrecheckResponse
 */
async function startK8sAppPrecheckWithOptions(request: StartK8sAppPrecheckRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StartK8sAppPrecheckResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.annotations)) {
    query['Annotations'] = request.annotations;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.componentIds)) {
    query['ComponentIds'] = request.componentIds;
  }
  if (!Util.isUnset(request.configMountDescs)) {
    query['ConfigMountDescs'] = request.configMountDescs;
  }
  if (!Util.isUnset(request.emptyDirs)) {
    query['EmptyDirs'] = request.emptyDirs;
  }
  if (!Util.isUnset(request.envFroms)) {
    query['EnvFroms'] = request.envFroms;
  }
  if (!Util.isUnset(request.envs)) {
    query['Envs'] = request.envs;
  }
  if (!Util.isUnset(request.imageUrl)) {
    query['ImageUrl'] = request.imageUrl;
  }
  if (!Util.isUnset(request.javaStartUpConfig)) {
    query['JavaStartUpConfig'] = request.javaStartUpConfig;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.limitEphemeralStorage)) {
    query['LimitEphemeralStorage'] = request.limitEphemeralStorage;
  }
  if (!Util.isUnset(request.limitMem)) {
    query['LimitMem'] = request.limitMem;
  }
  if (!Util.isUnset(request.limitmCpu)) {
    query['LimitmCpu'] = request.limitmCpu;
  }
  if (!Util.isUnset(request.localVolume)) {
    query['LocalVolume'] = request.localVolume;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.packageUrl)) {
    query['PackageUrl'] = request.packageUrl;
  }
  if (!Util.isUnset(request.pvcMountDescs)) {
    query['PvcMountDescs'] = request.pvcMountDescs;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.replicas)) {
    query['Replicas'] = request.replicas;
  }
  if (!Util.isUnset(request.requestsEphemeralStorage)) {
    query['RequestsEphemeralStorage'] = request.requestsEphemeralStorage;
  }
  if (!Util.isUnset(request.requestsMem)) {
    query['RequestsMem'] = request.requestsMem;
  }
  if (!Util.isUnset(request.requestsmCpu)) {
    query['RequestsmCpu'] = request.requestsmCpu;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartK8sAppPrecheck',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/app_precheck`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Starts precheck for Kubernetes application changes.
 *
 * @param request StartK8sAppPrecheckRequest
 * @return StartK8sAppPrecheckResponse
 */
async function startK8sAppPrecheck(request: StartK8sAppPrecheckRequest): StartK8sAppPrecheckResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return startK8sAppPrecheckWithOptions(request, headers, runtime);
}

model StartK8sApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can query the application ID by calling the ListApplication operation. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='93fdd228-*******-ed2ae98de18d'),
  replicas?: int32(name='Replicas', description='The number of instances on which you want to start the application.', example='2'),
  timeout?: int32(name='Timeout', description='The timeout period of the change process. Valid values: 1 to 1800. Default value: 600. Unit: seconds.', example='60'),
}

model StartK8sApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='*********d237-4827-a4f4-ed2ae98de18d'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='03FD1520-0FD6-436A-****-265318D7****'),
}

model StartK8sApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartK8sApplicationResponseBody(name='body'),
}

/**
 * @summary Starts an application in a Container Service for Kubernetes (ACK) cluster or Serverless Kubernetes cluster.
 *
 * @param request StartK8sApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartK8sApplicationResponse
 */
async function startK8sApplicationWithOptions(request: StartK8sApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StartK8sApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.replicas)) {
    query['Replicas'] = request.replicas;
  }
  if (!Util.isUnset(request.timeout)) {
    query['Timeout'] = request.timeout;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartK8sApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/start_k8s_app`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Starts an application in a Container Service for Kubernetes (ACK) cluster or Serverless Kubernetes cluster.
 *
 * @param request StartK8sApplicationRequest
 * @return StartK8sApplicationResponse
 */
async function startK8sApplication(request: StartK8sApplicationRequest): StartK8sApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return startK8sApplicationWithOptions(request, headers, runtime);
}

model StopApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='c627c157-560d*******'),
  eccInfo?: string(name='EccInfo', description='The ID of the elastic compute container (ECC) that corresponds to the Elastic Compute Service (ECS) instance on which you want to stop the application. You can call the QueryApplicationStatus operation to query the ECC ID. For more information, see [QueryApplicationStatus](https://help.aliyun.com/document_detail/149394.html).

*   If you want to stop the application on multiple ECS instances, separate the ECC IDs with commas (,).
*   If you leave this parameter empty, the application will be stopped on all ECS instances.', example='74ee9166-****1f6-bcb60e5b****'),
}

model StopApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process. You can call the GetChangeOrderInfo operation to query the details about the change process. For more information, see [GetChangeOrderInfo](https://help.aliyun.com/document_detail/62072.html).', example='a9557bac-ddd7-*********************'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-****************'),
}

model StopApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopApplicationResponseBody(name='body'),
}

/**
 * @summary Stops an application.
 *
 * @param request StopApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopApplicationResponse
 */
async function stopApplicationWithOptions(request: StopApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StopApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.eccInfo)) {
    query['EccInfo'] = request.eccInfo;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_stop`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Stops an application.
 *
 * @param request StopApplicationRequest
 * @return StopApplicationResponse
 */
async function stopApplication(request: StopApplicationRequest): StopApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return stopApplicationWithOptions(request, headers, runtime);
}

model StopK8sApplicationRequest {
  appId?: string(name='AppId', description='The ID of the application. You can query the application ID by calling the ListApplication operation. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='93fdd228-d237-*******8de18d'),
  timeout?: int32(name='Timeout', description='The timeout period of the change process. Unit: seconds.', example='60'),
}

model StopK8sApplicationResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='*******27-a4f4-ed2ae98de18d'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='03FD1520-0FD6-436A-****-265318D7****'),
}

model StopK8sApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopK8sApplicationResponseBody(name='body'),
}

/**
 * @summary Stops an application in a Container Service for Kubernetes (ACK) cluster or a Serverless Kubernetes cluster.
 *
 * @param request StopK8sApplicationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopK8sApplicationResponse
 */
async function stopK8sApplicationWithOptions(request: StopK8sApplicationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StopK8sApplicationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.timeout)) {
    query['Timeout'] = request.timeout;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopK8sApplication',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/stop_k8s_app`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Stops an application in a Container Service for Kubernetes (ACK) cluster or a Serverless Kubernetes cluster.
 *
 * @param request StopK8sApplicationRequest
 * @return StopK8sApplicationResponse
 */
async function stopK8sApplication(request: StopK8sApplicationRequest): StopK8sApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return stopK8sApplicationWithOptions(request, headers, runtime);
}

model SwitchAdvancedMonitoringRequest {
  appId?: string(name='AppId', description='The ID of the application for which you want to query or configure the advanced application monitoring feature.

This parameter is required.', example='9e224bc6-a646-4484-****-e617b7e7****'),
  enableAdvancedMonitoring?: boolean(name='EnableAdvancedMonitoring', description='Specifies whether to enable the advanced application monitoring feature. Valid values:

*   true: enables the advanced application monitoring feature.
*   false: disables the advanced application monitoring feature.

If you call this operation to query the status of the advanced application monitoring feature, you do not need to specify this parameter.', example='true'),
}

model SwitchAdvancedMonitoringResponseBody = {
  advancedMonitoringEnabled?: boolean(name='AdvancedMonitoringEnabled', description='Indicates whether the advanced application monitoring feature is enabled. Valid values:

*   true: The advanced application monitoring feature is enabled.
*   false: The advanced application monitoring feature is disabled.', example='false'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='The advanced monitoring status is disabled already for application which app_id is 9e224bc6-a646-4484-ae31-e617b7e7****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='577AED12-32D8-40B6-991F-17D7A601****'),
}

model SwitchAdvancedMonitoringResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SwitchAdvancedMonitoringResponseBody(name='body'),
}

/**
 * @summary Queries the status of the advanced application monitoring feature or configures this feature for an application that is deployed in an Elastic Compute Service (ECS) or Kubernetes cluster.
 *
 * @description To call the SwitchAdvancedMonitoring operation, you must make sure that the version of Enterprise Distributed Application Service (EDAS) SDK for Java or Python is 3.15.2 or later.
 *
 * @param request SwitchAdvancedMonitoringRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return SwitchAdvancedMonitoringResponse
 */
async function switchAdvancedMonitoringWithOptions(request: SwitchAdvancedMonitoringRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SwitchAdvancedMonitoringResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.enableAdvancedMonitoring)) {
    query['EnableAdvancedMonitoring'] = request.enableAdvancedMonitoring;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SwitchAdvancedMonitoring',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/monitor/advancedMonitorInfo`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the status of the advanced application monitoring feature or configures this feature for an application that is deployed in an Elastic Compute Service (ECS) or Kubernetes cluster.
 *
 * @description To call the SwitchAdvancedMonitoring operation, you must make sure that the version of Enterprise Distributed Application Service (EDAS) SDK for Java or Python is 3.15.2 or later.
 *
 * @param request SwitchAdvancedMonitoringRequest
 * @return SwitchAdvancedMonitoringResponse
 */
async function switchAdvancedMonitoring(request: SwitchAdvancedMonitoringRequest): SwitchAdvancedMonitoringResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return switchAdvancedMonitoringWithOptions(request, headers, runtime);
}

model SynchronizeResourceRequest {
  resourceIds?: string(name='ResourceIds', description='The ID of the resource. This parameter is required only when you set the Type parameter to `ecs`. If you specify multiple IDs, separate them with commas (,). You can synchronize up to 50 resources at a time.', example='i-bp17c***5q8x,i-bp1**5q8x'),
  type?: string(name='Type', description='The type of the resource to be synchronized. Valid values: `ecs, slb, vpc, and all`. These values are case-sensitive.

This parameter is required.', example='ecs'),
}

model SynchronizeResourceResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='The data returned for the request.', example='PopSyncResource success'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='F8DFGED-K98***************'),
  success?: boolean(name='Success', description='Indicates whether the resources are synchronized. Valid values:

*   **true**: The resources are synchronized.
*   **false**: The resources fail to be synchronized.', example='true'),
}

model SynchronizeResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SynchronizeResourceResponseBody(name='body'),
}

/**
 * @summary Synchronizes the basic Alibaba Cloud resources that belong to your account to Enterprise Distributed Application Service (EDAS). This operation is applicable to Elastic Compute Service (ECS) clusters.
 *
 * @description If you call this operation to synchronize ECS resource information, all instance data is synchronized from ECS. If you have more than 100 ECS instances, we recommend that you do not frequently call this operation.
 *
 * @param request SynchronizeResourceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return SynchronizeResourceResponse
 */
async function synchronizeResourceWithOptions(request: SynchronizeResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SynchronizeResourceResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.resourceIds)) {
    query['ResourceIds'] = request.resourceIds;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SynchronizeResource',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/pop_sync_resource`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Synchronizes the basic Alibaba Cloud resources that belong to your account to Enterprise Distributed Application Service (EDAS). This operation is applicable to Elastic Compute Service (ECS) clusters.
 *
 * @description If you call this operation to synchronize ECS resource information, all instance data is synchronized from ECS. If you have more than 100 ECS instances, we recommend that you do not frequently call this operation.
 *
 * @param request SynchronizeResourceRequest
 * @return SynchronizeResourceResponse
 */
async function synchronizeResource(request: SynchronizeResourceRequest): SynchronizeResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return synchronizeResourceWithOptions(request, headers, runtime);
}

model TagResourcesRequest {
  resourceIds?: string(name='ResourceIds', description='The IDs of the resources. You can specify up to 20 IDs in the format of a JSON array.

This parameter is required.', example='["000e5836-xxxx-xxxx-xxxx-0d6ab2ac4877"]'),
  resourceRegionId?: string(name='ResourceRegionId', description='The region in which the resource resides.

This parameter is required.', example='cn-hangzhou'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:

*   **application**: Enterprise Distributed Application Service (EDAS) application
*   **cluster**: EDAS cluster

This parameter is required.', example='application'),
  tags?: string(name='Tags', description='The key-value pairs. When you set this parameter, take note of the following limits:

*   You can add up to 20 tags to a resource.
*   The tag key cannot start with **aliyun** or **acs:**. It cannot contain **http://** or **https://**.
*   The tag key or tag value can be up to 128 characters in length, and can contain letters, digits, hyphens (-), commas (,), asterisks (\\\\*), forward slashes (/), question marks (?), and colons (:).
*   Set this parameter to a JSON array.

This parameter is required.', example='[{"key":"key1","value":"v1"},{"key":"key2","value":"v2"}]'),
}

model TagResourcesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='000e5836-xxxx-xxxx-xxxx-0d6ab2ac4877'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @summary Creates tags and adds the tags to resources at a time.
 *
 * @param request TagResourcesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.resourceIds)) {
    query['ResourceIds'] = request.resourceIds;
  }
  if (!Util.isUnset(request.resourceRegionId)) {
    query['ResourceRegionId'] = request.resourceRegionId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/tag/tags`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates tags and adds the tags to resources at a time.
 *
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return tagResourcesWithOptions(request, headers, runtime);
}

model TransformClusterMemberRequest {
  instanceIds?: string(name='InstanceIds', description='The ID of the instance that you want to import or migrate. Separate multiple IDs with commas (,).

*   An instance may not belong to a cluster, but an instance can belong to only one cluster at most.
*   The ECS instances and the destination cluster must be in the same virtual private cloud (VPC).

This parameter is required.', example='i-2ze7s2v0b789k60p****'),
  password?: string(name='Password', description='The logon password of the ECS instance that you want to import or migrate to the cluster.

This parameter is required.', example='Hello****'),
  targetClusterId?: string(name='TargetClusterId', description='The ID of the destination cluster.

This parameter is required.', example='b3e3f77b-462e-****-****-bec8727a****'),
}

model TransformClusterMemberResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='`Transform submit success!` is returned if the request is successful.', example='Transform submit success!'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
}

model TransformClusterMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TransformClusterMemberResponseBody(name='body'),
}

/**
 * @summary Imports or migrates one or more Elastic Compute Service (ECS) instances to a cluster.
 *
 * @description ## Limits
 * When you call this operation to import an ECS instance, the operating system of the ECS instance is reinstalled. After the operating system is reinstalled, all data of the ECS instance is deleted. You must set a logon password for the ECS instance. Make sure that no important data exists on or data has been backed up for the ECS instance that you want to import.
 *
 * @param request TransformClusterMemberRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return TransformClusterMemberResponse
 */
async function transformClusterMemberWithOptions(request: TransformClusterMemberRequest, headers: map[string]string, runtime: Util.RuntimeOptions): TransformClusterMemberResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.instanceIds)) {
    query['InstanceIds'] = request.instanceIds;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.targetClusterId)) {
    query['TargetClusterId'] = request.targetClusterId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TransformClusterMember',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/resource/transform_cluster_member`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Imports or migrates one or more Elastic Compute Service (ECS) instances to a cluster.
 *
 * @description ## Limits
 * When you call this operation to import an ECS instance, the operating system of the ECS instance is reinstalled. After the operating system is reinstalled, all data of the ECS instance is deleted. You must set a logon password for the ECS instance. Make sure that no important data exists on or data has been backed up for the ECS instance that you want to import.
 *
 * @param request TransformClusterMemberRequest
 * @return TransformClusterMemberResponse
 */
async function transformClusterMember(request: TransformClusterMemberRequest): TransformClusterMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return transformClusterMemberWithOptions(request, headers, runtime);
}

model UnbindK8sSlbRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='5a166fbd-****-****-a286-781659d9f54c'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster. You can call the GetK8sCluster operation to query the cluster ID. For more information, see [GetK8sCluster](https://help.aliyun.com/document_detail/181437.html).', example='712082c3-****-****-9217-a947b5cde6ee'),
  slbName?: string(name='SlbName', description='The name of the SLB instance.', example='a2d4ab12666544a479cdd0711a97****'),
  type?: string(name='Type', description='The type of the SLB instance. Valid values:

*   **internet**: Internet-facing SLB instance
*   **intranet**: internal-facing SLB instance

This parameter is required.', example='internet'),
}

model UnbindK8sSlbResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='b0a8441e-****-4e8e-9874-b56dea02952f'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='1234-1sda-321d-1234'),
}

model UnbindK8sSlbResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindK8sSlbResponseBody(name='body'),
}

/**
 * @summary Unbinds a Server Load Balancer (SLB) instance from an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request UnbindK8sSlbRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindK8sSlbResponse
 */
async function unbindK8sSlbWithOptions(request: UnbindK8sSlbRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UnbindK8sSlbResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.slbName)) {
    query['SlbName'] = request.slbName;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnbindK8sSlb',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_slb_binding`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unbinds a Server Load Balancer (SLB) instance from an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request UnbindK8sSlbRequest
 * @return UnbindK8sSlbResponse
 */
async function unbindK8sSlb(request: UnbindK8sSlbRequest): UnbindK8sSlbResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return unbindK8sSlbWithOptions(request, headers, runtime);
}

model UnbindSlbRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='c627c157-560d-********************'),
  deleteListener?: string(name='DeleteListener', description='Specifies whether to remove the configured listeners. Valid values:

*   true: removes the configured listeners.
*   false: does not remove the configured listeners.', example='false'),
  slbId?: string(name='SlbId', description='The ID of the SLB instance.

This parameter is required.', example='lb-wz9vo49****************'),
  type?: string(name='Type', description='The network type of the SLB instance. Valid values:

*   **internet**: Internet-facing SLB instance
*   **intranet**: internal-facing SLB instance

This parameter is required.', example='internet'),
}

model UnbindSlbResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: string(name='Data', description='This parameter is left empty. It has no meaning.', example='{}'),
  message?: string(name='Message', description='The message that is returned.', example='Unbind slb success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-************'),
}

model UnbindSlbResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindSlbResponseBody(name='body'),
}

/**
 * @summary Unbinds a Server Load Balancer (SLB) instance from an application.
 *
 * @param request UnbindSlbRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindSlbResponse
 */
async function unbindSlbWithOptions(request: UnbindSlbRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UnbindSlbResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.deleteListener)) {
    query['DeleteListener'] = request.deleteListener;
  }
  if (!Util.isUnset(request.slbId)) {
    query['SlbId'] = request.slbId;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnbindSlb',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/app/unbind_slb_json`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Unbinds a Server Load Balancer (SLB) instance from an application.
 *
 * @param request UnbindSlbRequest
 * @return UnbindSlbResponse
 */
async function unbindSlb(request: UnbindSlbRequest): UnbindSlbResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return unbindSlbWithOptions(request, headers, runtime);
}

model UntagResourcesRequest {
  deleteAll?: boolean(name='DeleteAll', description='Specifies whether to remove all existing tags from the specified resources. Default value: false. Valid values:

*   **true**: removes all existing tags from the specified resources.
*   **false**: does not remove all existing tags from the specified resources.

> All existing tags of a resource are removed only if the **tagKeys** parameter is left empty and the **DeleteAll** parameter is set to true.', example='true'),
  resourceIds?: string(name='ResourceIds', description='The IDs of the resources from which you want to remove tags. You can specify up to 20 IDs.

This parameter is required.', example='["f5ad6ff7-xxxx-xxxx-xxxx-2axxxx82xxxx"]'),
  resourceRegionId?: string(name='ResourceRegionId', description='The region in which the resource resides.

This parameter is required.', example='cn-beijing'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:

*   **application**: Enterprise Distributed Application Service (EDAS) application
*   **cluster**: EDAS cluster

This parameter is required.', example='application'),
  tagKeys?: string(name='TagKeys', description='The tags that you want to remove. You can specify up to 20 tags. Set this parameter to a JSON array.', example='["tagKey1","tagKey2"]'),
}

model UntagResourcesResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='000e5836-xxxx-xxxx-xxxx-0d6ab2ac4877'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @summary Removes one or more tags from one or more resources.
 *
 * @param request UntagResourcesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(request: UntagResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.deleteAll)) {
    query['DeleteAll'] = request.deleteAll;
  }
  if (!Util.isUnset(request.resourceIds)) {
    query['ResourceIds'] = request.resourceIds;
  }
  if (!Util.isUnset(request.resourceRegionId)) {
    query['ResourceRegionId'] = request.resourceRegionId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagKeys)) {
    query['TagKeys'] = request.tagKeys;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/tag/tags`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes one or more tags from one or more resources.
 *
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return untagResourcesWithOptions(request, headers, runtime);
}

model UpdateAccountInfoRequest {
  email?: string(name='Email', description='The email address of the account.', example='1321234****@alibaba-inc.com'),
  name?: string(name='Name', description='The name of the account.', example='edas-test'),
  telephone?: string(name='Telephone', description='The contact information of the account.', example='1321234****'),
}

model UpdateAccountInfoResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='edit successfully'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='ECD1D6FC-4307-4583-BA6F-215F3857EAF4'),
}

model UpdateAccountInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAccountInfoResponseBody(name='body'),
}

/**
 * @summary Modifies the information about an account.
 *
 * @param request UpdateAccountInfoRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAccountInfoResponse
 */
async function updateAccountInfoWithOptions(request: UpdateAccountInfoRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateAccountInfoResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.email)) {
    query['Email'] = request.email;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.telephone)) {
    query['Telephone'] = request.telephone;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAccountInfo',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/edit_account_info`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the information about an account.
 *
 * @param request UpdateAccountInfoRequest
 * @return UpdateAccountInfoResponse
 */
async function updateAccountInfo(request: UpdateAccountInfoRequest): UpdateAccountInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateAccountInfoWithOptions(request, headers, runtime);
}

model UpdateApplicationBaseInfoRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='c627c157-560d-43ff-****-************'),
  appName?: string(name='AppName', description='The name of the application. The name must start with a letter, and can contain letters, digits, underscores (_), and hyphens (-). The name can be up to 36 characters in length.', example='hello-edas'),
  desc?: string(name='Desc', description='The description of the application. The description can be up to 256 characters in length.', example='Test application'),
  owner?: string(name='Owner', description='The owner of the application. The value can be up to 127 characters in length.', example='test@aliyun_xxx.com'),
}

model UpdateApplicationBaseInfoResponseBody = {
  applcation?: {
    appId?: string(name='AppId', description='The ID of the application.', example='c627c157-560d-43ff-****-************'),
    applicationType?: string(name='ApplicationType', description='The deployment type of the application. Valid values:

*   War: The application is deployed by using a WAR package.
*   FatJar: The application is deployed by using a JAR package.
*   Image: The application is deployed by using an image.
*   If this parameter is empty, the application is not deployed.', example='FatJar'),
    buildPackageId?: long(name='BuildPackageId', description='The build package number of Enterprise Distributed Application Service (EDAS) Container.', example='58'),
    clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='d7730a49-629a-47bd-****-f45eb01f****'),
    clusterType?: int32(name='ClusterType', description='The type of the cluster. Valid values:

*   0: normal Docker cluster
*   1: Swarm cluster
*   2: ECS cluster
*   3: self-managed Kubernetes cluster in EDAS
*   4: cluster in which Pandora automatically registers applications
*   5: Container Service for Kubernetes (ACK) clusters', example='2'),
    cpu?: int32(name='Cpu', description='The number of CPU cores.', example='0'),
    createTime?: long(name='CreateTime', description='The time when the application was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1577259573911'),
    description?: string(name='Description', description='The description of the application.', example='test'),
    dockerize?: boolean(name='Dockerize', description='Indicates whether the application is a Docker application.', example='false'),
    extSlbId?: string(name='ExtSlbId', description='The ID of the Internet-facing SLB instance.', example='ace93*******'),
    extSlbIp?: string(name='ExtSlbIp', description='The IP address of the Internet-facing Server Load Balancer (SLB) instance.', example='39.97.XX.XX'),
    extSlbName?: string(name='ExtSlbName', description='The name of the Internet-facing SLB instance.', example='test'),
    healthCheckUrl?: string(name='HealthCheckUrl', description='The health check URL.', example='http://127.0.XX.XX:8080/_etc.html'),
    instanceCount?: int32(name='InstanceCount', description='The number of application instances.', example='1'),
    memory?: int32(name='Memory', description='The size of memory configured for an application instance. Unit: MB.', example='0'),
    name?: string(name='Name', description='The name of the application.', example='test'),
    owner?: string(name='Owner', description='The owner of the application.', example='test@aliyun_XXX.com'),
    port?: int32(name='Port', description='The port used by the application.', example='8080'),
    regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing:****'),
    runningInstanceCount?: int32(name='RunningInstanceCount', description='The number of running application instances.', example='1'),
    slbId?: string(name='SlbId', description='The ID of the internal-facing SLB instance.', example='a3d4*******'),
    slbIp?: string(name='SlbIp', description='The IP address of the internal-facing SLB instance.', example='192.168.XX.XX'),
    slbName?: string(name='SlbName', description='The name of the internal-facing SLB instance.', example='test'),
    slbPort?: int32(name='SlbPort', description='The port used by the internal-facing SLB instance.', example='80'),
    userId?: string(name='UserId', description='The ID of the Alibaba Cloud account.', example='edas_com***@****.***'),
  }(name='Applcation', description='The applications that you want to modify.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-**************'),
}

model UpdateApplicationBaseInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateApplicationBaseInfoResponseBody(name='body'),
}

/**
 * @summary Modifies the name, description, and owner of an application.
 *
 * @param request UpdateApplicationBaseInfoRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateApplicationBaseInfoResponse
 */
async function updateApplicationBaseInfoWithOptions(request: UpdateApplicationBaseInfoRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateApplicationBaseInfoResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.desc)) {
    query['Desc'] = request.desc;
  }
  if (!Util.isUnset(request.owner)) {
    query['Owner'] = request.owner;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateApplicationBaseInfo',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/update_app_info`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the name, description, and owner of an application.
 *
 * @param request UpdateApplicationBaseInfoRequest
 * @return UpdateApplicationBaseInfoResponse
 */
async function updateApplicationBaseInfo(request: UpdateApplicationBaseInfoRequest): UpdateApplicationBaseInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateApplicationBaseInfoWithOptions(request, headers, runtime);
}

model UpdateApplicationScalingRuleRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).', example='78194c76-3dca-418e-a263-cccd1ab4****'),
  scalingBehaviour?: string(name='ScalingBehaviour', description='The behavior of the auto scaling. See the example for the data structure.', example='{"scaleUp":{"stabilizationWindowSeconds":"0","selectPolicy":"Max","policies":[{"type":"Pods","value":5,"periodSeconds":15}]},"scaleDown":{"stabilizationWindowSeconds":"300","selectPolicy":"Max","policies":[{"type":"Percent","value":200,"periodSeconds":15}]}}'),
  scalingRuleEnable?: boolean(name='ScalingRuleEnable', description='Specifies whether to enable the auto scaling policy. Valid values:

*   **true**: enables the auto scaling policy.
*   **false**: disables the auto scaling policy.', example='true'),
  scalingRuleMetric?: string(name='ScalingRuleMetric', description='This parameter is deprecated.', example='1'),
  scalingRuleName?: string(name='ScalingRuleName', description='The name of the auto scaling policy.', example='cpu-trigger'),
  scalingRuleTimer?: string(name='ScalingRuleTimer', description='This parameter is deprecated.', example='1'),
  scalingRuleTrigger?: string(name='ScalingRuleTrigger', description='The trigger policy for the auto scaling policy. Set this parameter in the JSON format by using the ScalingRuleTriggerDTO class. For more information, see Additional description of request parameters.', example='ScalingRuleTriggerDTO{......}'),
  scalingRuleType?: string(name='ScalingRuleType', description='The type of the auto scaling policy.

*   Set the value to trigger.', example='trigger'),
}

model UpdateApplicationScalingRuleResponseBody = {
  appScalingRule?: {
    appId?: string(name='AppId', description='The ID of the application to which the auto scaling policy belongs.', example='78194c76-3dca-418e-a263-cccd1ab4****'),
    behaviour?: {
      scaleDown?: {
        policies?: [ 
          {
            periodSeconds?: int32(name='PeriodSeconds', description='The cycle of the policy check. Valid values: 0 to 1800. Unit: seconds.', example='15'),
            type?: string(name='Type', description='The type of the policy. Valid values: Pods and Percent.', example='Pods'),
            value?: string(name='Value', description='The policy value of auto scaling. Set the value to an integer greater than zero. If the policy type is Pods, the value of this parameter indicates the number of pods. If the policy type is Percent, the value of this parameter indicates a percentage, which can exceed 100%.', example='10'),
          }
        ](name='Policies', description='The configuration of the policy.'),
        selectPolicy?: string(name='SelectPolicy', description='The step size policy for the scale-in. Valid values: Max, Min, and Disable.', example='Max'),
        stabilizationWindowSeconds?: int32(name='StabilizationWindowSeconds', description='The cooldown time of the scale-in. Valid values: 0 to 3600. Unit: seconds. Default value: 300.', example='300'),
      }(name='ScaleDown'),
      scaleUp?: {
        policies?: [ 
          {
            periodSeconds?: int32(name='PeriodSeconds', description='The cycle of the policy check. Valid values: 0 to 1800. Unit: seconds.', example='15'),
            type?: string(name='Type', description='The type of the policy. Valid values: Pods and Percent.', example='Pods'),
            value?: string(name='Value', description='The policy value of auto scaling. Set the value to an integer greater than zero. If the policy type is Pods, the value of this parameter indicates the number of pods. If the policy type is Percent, the value of this parameter indicates a percentage, which can exceed 100%.', example='10'),
          }
        ](name='Policies', description='The configuration of the policy.'),
        selectPolicy?: string(name='SelectPolicy', description='The step size policy for the scale-out. Valid values: Max, Min, and Disable.', example='Max'),
        stabilizationWindowSeconds?: int32(name='StabilizationWindowSeconds', description='The cooldown time of the scale-out. Valid values: 0 to 3600. Unit: seconds. Default value: 0.', example='0'),
      }(name='ScaleUp'),
    }(name='Behaviour'),
    createTime?: long(name='CreateTime', description='The time when the auto scaling policy was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1574251601785'),
    lastDisableTime?: long(name='LastDisableTime', description='The time when the auto scaling policy was last disabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1574251601785'),
    maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
    metric?: {
      maxReplicas?: int32(name='MaxReplicas', description='This parameter is deprecated.', example='1'),
      metrics?: [ 
        {
          metricTargetAverageUtilization?: int32(name='MetricTargetAverageUtilization', description='This parameter is deprecated.', example='1'),
          metricType?: string(name='MetricType', description='This parameter is deprecated.', example='cpu'),
        }
      ](name='Metrics', description='This parameter is deprecated.'),
      minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
    }(name='Metric', description='This parameter is deprecated.'),
    minReplicas?: int32(name='MinReplicas', description='This parameter is deprecated.', example='1'),
    scaleRuleEnabled?: boolean(name='ScaleRuleEnabled', description='Indicates whether the auto scaling policy is enabled. Valid values:

*   **true**: The auto scaling policy is enabled.
*   **false**: The auto scaling policy is disabled.', example='true'),
    scaleRuleName?: string(name='ScaleRuleName', description='The name of the auto scaling policy.', example='cpu-trigger'),
    scaleRuleType?: string(name='ScaleRuleType', description='The type of the auto scaling policy. The value is fixed to trigger.', example='trigger'),
    trigger?: {
      maxReplicas?: int32(name='MaxReplicas', description='The maximum number of replicas. The maximum value is 1000.', example='122'),
      minReplicas?: int32(name='MinReplicas', description='The minimum number of replicas. The minimum value is 0.', example='1'),
      triggers?: [ 
        {
          metaData?: string(name='MetaData', description='The metadata of the trigger.', example='{"dryRun":true}'),
          name?: string(name='Name', description='The name of the trigger.', example='cpu'),
          type?: string(name='Type', description='The type of the trigger. Valid values: cron and app_metric.', example='cron'),
        }
      ](name='Triggers', description='The configurations of the trigger.'),
    }(name='Trigger', description='The configurations of the trigger.'),
    updateTime?: long(name='UpdateTime', description='The time when the auto scaling policy was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1574251601785'),
  }(name='AppScalingRule', description='The information about the auto scaling policy.'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323de7b5a'),
}

model UpdateApplicationScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateApplicationScalingRuleResponseBody(name='body'),
}

/**
 * @summary Modifies an auto scaling policy for an application.
 *
 * @param request UpdateApplicationScalingRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateApplicationScalingRuleResponse
 */
async function updateApplicationScalingRuleWithOptions(request: UpdateApplicationScalingRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateApplicationScalingRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.scalingBehaviour)) {
    query['ScalingBehaviour'] = request.scalingBehaviour;
  }
  if (!Util.isUnset(request.scalingRuleEnable)) {
    query['ScalingRuleEnable'] = request.scalingRuleEnable;
  }
  if (!Util.isUnset(request.scalingRuleMetric)) {
    query['ScalingRuleMetric'] = request.scalingRuleMetric;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }
  if (!Util.isUnset(request.scalingRuleTimer)) {
    query['ScalingRuleTimer'] = request.scalingRuleTimer;
  }
  if (!Util.isUnset(request.scalingRuleTrigger)) {
    query['ScalingRuleTrigger'] = request.scalingRuleTrigger;
  }
  if (!Util.isUnset(request.scalingRuleType)) {
    query['ScalingRuleType'] = request.scalingRuleType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateApplicationScalingRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v1/eam/scale/application_scaling_rule`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies an auto scaling policy for an application.
 *
 * @param request UpdateApplicationScalingRuleRequest
 * @return UpdateApplicationScalingRuleResponse
 */
async function updateApplicationScalingRule(request: UpdateApplicationScalingRuleRequest): UpdateApplicationScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateApplicationScalingRuleWithOptions(request, headers, runtime);
}

model UpdateConfigTemplateRequest {
  content?: string(name='Content', description='The content of the configuration template. The value must be in the format that is specified by the Format parameter.', example='{"name":"william","age":18}'),
  description?: string(name='Description', description='The description of the configuration template. The description can be up to 255 characters in length.', example='Test configuration template'),
  format?: string(name='Format', description='The data format of the configuration template. Valid values:

*   JSON: JSON format
*   XML: XML format
*   YAML: YAML format
*   Properties: .properties format
*   KeyValue: key-value pairs
*   Custom: custom format', example='JSON'),
  id?: long(name='Id', description='The ID of the configuration template.', example='123'),
  name?: string(name='Name', description='The name of the configuration template. The name can be up to 64 characters in length.', example='configtmpl1'),
}

model UpdateConfigTemplateResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-*************'),
}

model UpdateConfigTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateConfigTemplateResponseBody(name='body'),
}

/**
 * @summary Modifies a configuration template.
 *
 * @param request UpdateConfigTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateConfigTemplateResponse
 */
async function updateConfigTemplateWithOptions(request: UpdateConfigTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateConfigTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.content)) {
    body['Content'] = request.content;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.format)) {
    body['Format'] = request.format;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateConfigTemplate',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/config_template`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a configuration template.
 *
 * @param request UpdateConfigTemplateRequest
 * @return UpdateConfigTemplateResponse
 */
async function updateConfigTemplate(request: UpdateConfigTemplateRequest): UpdateConfigTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateConfigTemplateWithOptions(request, headers, runtime);
}

model UpdateContainerRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='e83acea6-****-47e1-96ae-c0e953772cdc'),
  buildPackId?: int32(name='BuildPackId', description='The build package number of EDAS Container. You can obtain the build package number in the Build package number column in the EDAS Container release notes table. For more information, see [Release notes for EDAS Container](https://help.aliyun.com/document_detail/92614.html).

This parameter is required.', example='59'),
}

model UpdateContainerResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='eb1b9862-****-476f-9e78-d6aa0842835a'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='a5281053-08e4-47a5-b2ab-5c0323******'),
}

model UpdateContainerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateContainerResponseBody(name='body'),
}

/**
 * @summary Updates the Enterprise Distributed Application Service (EDAS) Container version of a High-Speed Service Framework (HSF) application. EDAS Container includes Ali-Tomcat and Pandora.
 *
 * @param request UpdateContainerRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateContainerResponse
 */
async function updateContainerWithOptions(request: UpdateContainerRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateContainerResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.buildPackId)) {
    query['BuildPackId'] = request.buildPackId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateContainer',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/changeorder/co_update_container`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Updates the Enterprise Distributed Application Service (EDAS) Container version of a High-Speed Service Framework (HSF) application. EDAS Container includes Ali-Tomcat and Pandora.
 *
 * @param request UpdateContainerRequest
 * @return UpdateContainerResponse
 */
async function updateContainer(request: UpdateContainerRequest): UpdateContainerResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateContainerWithOptions(request, headers, runtime);
}

model UpdateContainerConfigurationRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='c627c157-560d-43ff-************'),
  contextPath?: string(name='ContextPath', description='The context path of the Tomcat container. The context path can be an empty string, a null WAR package name, a root directory, or other custom non-empty strings. It can contain letters, digits, hyphens (-), and underscores (_). Take note of the following items:

*   If this parameter is not specified when you configure the application instance group, the configuration of the application is applied.
*   If this parameter is not specified when you configure the Tomcat container for an application, the root directory `/` is used.', example='/'),
  groupId?: string(name='GroupId', description='The ID of the application instance group.

*   If an ID is specified, this operation configures the Tomcat container for the specified application instance group.
*   If you set this parameter to "", this operation configures the Tomcat container for the application.', example='8123db90-880f-**************'),
  httpPort?: int32(name='HttpPort', description='The application port number for the Tomcat container. Take note of the following items:

*   If this parameter is not specified when you configure the application instance group, the configuration of the application is applied.
*   If this parameter is not specified when you configure the application, the default port 8080 is applied.', example='8080'),
  maxThreads?: int32(name='MaxThreads', description='The maximum number of threads. Take note of the following items:

*   If this parameter is not specified when you configure the application instance group, the configuration of the application is applied.
*   If this parameter is not specified when you configure the application, the default value 250 is applied.', example='20'),
  URIEncoding?: string(name='URIEncoding', description='The uniform resource identifier (URI) encoding scheme. Valid values: ISO-8859-1, GBK, GB2312, and UTF-8. Take note of the following items:

*   If this parameter is not specified when you configure the application instance group, the configuration of the application is applied.
*   If this parameter is not specified when you configure the application, the default URI encoding scheme in the Tomcat container is applied.', example='ISO-8859-1'),
  useBodyEncoding?: boolean(name='UseBodyEncoding', description='Specifies whether to use the encoding scheme specified in the request body for URI query parameters. Take note of the following items:

*   If this parameter is not specified when you configure the application instance group, the configuration of the application is applied.
*   If this parameter is not specified when you configure the application, the default value false is applied.', example='true'),
}

model UpdateContainerConfigurationResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  containerConfiguration?: {
    contextPath?: string(name='ContextPath', description='The context path of the Tomcat container.', example='/'),
    httpPort?: int32(name='HttpPort', description='The application port number for the Tomcat container.', example='8080'),
    maxThreads?: int32(name='MaxThreads', description='The maximum number of threads.', example='20'),
    URIEncoding?: string(name='URIEncoding', description='The URI encoding scheme. Valid values: ISO-8859-1, GBK, GB2312, and UTF-8.', example='ISO-8859-1'),
    useBodyEncoding?: boolean(name='UseBodyEncoding', description='Indicates whether useBodyEncodingForURI is enabled.', example='true'),
  }(name='ContainerConfiguration', description='The configuration of the Tomcat container.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-***************'),
}

model UpdateContainerConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateContainerConfigurationResponseBody(name='body'),
}

/**
 * @summary Configures the Tomcat container for an application or application instance group in an Elastic Compute Service (ECS) cluster.
 *
 * @param request UpdateContainerConfigurationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateContainerConfigurationResponse
 */
async function updateContainerConfigurationWithOptions(request: UpdateContainerConfigurationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateContainerConfigurationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.contextPath)) {
    query['ContextPath'] = request.contextPath;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.httpPort)) {
    query['HttpPort'] = request.httpPort;
  }
  if (!Util.isUnset(request.maxThreads)) {
    query['MaxThreads'] = request.maxThreads;
  }
  if (!Util.isUnset(request.URIEncoding)) {
    query['URIEncoding'] = request.URIEncoding;
  }
  if (!Util.isUnset(request.useBodyEncoding)) {
    query['UseBodyEncoding'] = request.useBodyEncoding;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateContainerConfiguration',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/container_config`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Configures the Tomcat container for an application or application instance group in an Elastic Compute Service (ECS) cluster.
 *
 * @param request UpdateContainerConfigurationRequest
 * @return UpdateContainerConfigurationResponse
 */
async function updateContainerConfiguration(request: UpdateContainerConfigurationRequest): UpdateContainerConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateContainerConfigurationWithOptions(request, headers, runtime);
}

model UpdateHealthCheckUrlRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='c627c157-560d-43ff-***************'),
  hcURL?: string(name='hcURL', description='The health check URL of the application. The URL must start with `http://`, and can be up to 255 characters in length. Example: `http://127.0.0.1:8080/_ehc.html`. If this parameter is not specified, the health check URL of the application is not changed.', example='http://127.0.0.1:8080/_ehc.html'),
}

model UpdateHealthCheckUrlResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  healthCheckURL?: string(name='HealthCheckURL', description='The health check URL.', example='http://127.0.0.1:8080/_ehc.html'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-*****************'),
}

model UpdateHealthCheckUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateHealthCheckUrlResponseBody(name='body'),
}

/**
 * @summary Changes the health check URL for an application.
 *
 * @param request UpdateHealthCheckUrlRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateHealthCheckUrlResponse
 */
async function updateHealthCheckUrlWithOptions(request: UpdateHealthCheckUrlRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateHealthCheckUrlResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.hcURL)) {
    query['hcURL'] = request.hcURL;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateHealthCheckUrl',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/modify_hc_url`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Changes the health check URL for an application.
 *
 * @param request UpdateHealthCheckUrlRequest
 * @return UpdateHealthCheckUrlResponse
 */
async function updateHealthCheckUrl(request: UpdateHealthCheckUrlRequest): UpdateHealthCheckUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateHealthCheckUrlWithOptions(request, headers, runtime);
}

model UpdateHookConfigurationRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='d498****-1dd8ec229862'),
  groupId?: string(name='GroupId', description='The ID of the application instance group.', example='d498****-1dd8ec229862'),
  hooks?: string(name='Hooks', description='The script to mount. Set the value in the JSON format. Example: `[{"ignoreFail":false,"name":"postprepareInstanceEnvironmentOnScaleOut","script":"ls"},{"ignoreFail":true,"name":"postdeleteInstanceDataOnScaleIn","script":""},{"ignoreFail":true,"name":"prestartInstance","script":""},{"ignoreFail":true,"name":"poststartInstance","script":""},{"ignoreFail":true,"name":"prestopInstance","script":""},{"ignoreFail":true,"name":"poststopInstance","script":""}]`

This parameter is required.', example='[{"ignoreFail":false,"name":"postprepareInstanceEnvironmentOnScaleOut","script":"ls"}]'),
}

model UpdateHookConfigurationResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  hooksConfiguration?: [ 
    {
      ignoreFail?: boolean(name='IgnoreFail', description='Indicates whether a mount failure is ignored. Valid values:

*   **true**: A mount failure is ignored.
*   **false**: A mount failure is not ignored.', example='true'),
      name?: string(name='Name', description='The name of the mounted script.', example='postprepareInstanceEnvironmentOnScaleOut'),
      script?: string(name='Script', description='The content of the mounted script.', example='ls'),
    }
  ](name='HooksConfiguration', description='The information about the mounted script.'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='d498****-1dd8ec229862'),
}

model UpdateHookConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateHookConfigurationResponseBody(name='body'),
}

/**
 * @summary Mounts a script to an application or application instance group.
 *
 * @param request UpdateHookConfigurationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateHookConfigurationResponse
 */
async function updateHookConfigurationWithOptions(request: UpdateHookConfigurationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateHookConfigurationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.hooks)) {
    query['Hooks'] = request.hooks;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateHookConfiguration',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/app/config_app_hook_json`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Mounts a script to an application or application instance group.
 *
 * @param request UpdateHookConfigurationRequest
 * @return UpdateHookConfigurationResponse
 */
async function updateHookConfiguration(request: UpdateHookConfigurationRequest): UpdateHookConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateHookConfigurationWithOptions(request, headers, runtime);
}

model UpdateJvmConfigurationRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='c627c157-560d-*************'),
  groupId?: string(name='GroupId', description='The ID of the instance group where the application is deployed. You can call the ListDeployGroup operation to query the group ID. For more information, see [ListDeployGroup](https://help.aliyun.com/document_detail/62077.html).

> 

*   To configure the JVM parameters for an instance group, set this parameter to a specific ID.

*   To configure the JVM parameters for an application, leave this parameter empty.', example='0afc726e-077e-4357-98b2-db9f7145****'),
  maxHeapSize?: int32(name='MaxHeapSize', description='The maximum size of the heap memory. Unit: MB.

> 

*   If this parameter is not specified in the group configuration, the value specified in the application configuration is used.

*   If this parameter is not specified in the application configuration, the default value is used.', example='500'),
  maxPermSize?: int32(name='MaxPermSize', description='The size of the permanent generation heap memory. Unit: MB.

> 

*   If this parameter is not specified in the group configuration, the value specified in the application configuration is used.

*   If this parameter is not specified in the application configuration, the default value is used.', example='1000'),
  minHeapSize?: int32(name='MinHeapSize', description='The initial size of the heap memory. Unit: MB.

> 

*   If this parameter is not specified in the group configuration, the value specified in the application configuration is used.

*   If this parameter is not specified in the application configuration, the default value is used.', example='500'),
  options?: string(name='Options', description='The custom JVM parameters.

> 

*   If this parameter is not specified in the group configuration, the value specified in the application configuration is used.

*   If this parameter is not specified in the application configuration, the default value is used.', example='-Dproperty=value'),
}

model UpdateJvmConfigurationResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  jvmConfiguration?: {
    maxHeapSize?: int32(name='MaxHeapSize', description='The maximum size of the heap memory. Unit: MB.', example='500'),
    maxPermSize?: int32(name='MaxPermSize', description='The size of the permanent generation heap memory. Unit: MB.', example='1000'),
    minHeapSize?: int32(name='MinHeapSize', description='The initial size of the heap memory. Unit: MB.', example='500'),
    options?: string(name='Options', description='The optional parameters.', example='”“'),
  }(name='JvmConfiguration', description='The settings of the JVM parameters.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-********************'),
}

model UpdateJvmConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateJvmConfigurationResponseBody(name='body'),
}

/**
 * @summary Configures the Java virtual machine (JVM) parameters for an application or an instance group where the application is deployed.
 *
 * @param request UpdateJvmConfigurationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateJvmConfigurationResponse
 */
async function updateJvmConfigurationWithOptions(request: UpdateJvmConfigurationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateJvmConfigurationResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.maxHeapSize)) {
    query['MaxHeapSize'] = request.maxHeapSize;
  }
  if (!Util.isUnset(request.maxPermSize)) {
    query['MaxPermSize'] = request.maxPermSize;
  }
  if (!Util.isUnset(request.minHeapSize)) {
    query['MinHeapSize'] = request.minHeapSize;
  }
  if (!Util.isUnset(request.options)) {
    query['Options'] = request.options;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateJvmConfiguration',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/app/app_jvm_config`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Configures the Java virtual machine (JVM) parameters for an application or an instance group where the application is deployed.
 *
 * @param request UpdateJvmConfigurationRequest
 * @return UpdateJvmConfigurationResponse
 */
async function updateJvmConfiguration(request: UpdateJvmConfigurationRequest): UpdateJvmConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateJvmConfigurationWithOptions(request, headers, runtime);
}

model UpdateK8sApplicationBaseInfoRequest {
  appId?: string(name='AppId', description='The ID of the application that you want to modify.

This parameter is required.', example='4f038ddf-b27b-****-****-88e44375****'),
  description?: string(name='Description', description='The description of the application. The description can be up to 256 characters in length.', example='app for pre-production'),
  email?: string(name='Email', description='The email address of the application owner.', example='mymail@example.com'),
  owner?: string(name='Owner', description='The owner of the application. The value can be up to 128 characters in length.', example='Tom'),
  phoneNumber?: string(name='PhoneNumber', description='The phone number of the application owner.', example='1361234xxxx'),
}

model UpdateK8sApplicationBaseInfoResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='57F146F6-3C94-****-****-A66EF4B9*****'),
  result?: string(name='Result', description='The result of the modification.', example='success'),
}

model UpdateK8sApplicationBaseInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateK8sApplicationBaseInfoResponseBody(name='body'),
}

/**
 * @summary Modifies basic information about an application that is deployed in a Kubernetes cluster.
 *
 * @param request UpdateK8sApplicationBaseInfoRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sApplicationBaseInfoResponse
 */
async function updateK8sApplicationBaseInfoWithOptions(request: UpdateK8sApplicationBaseInfoRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sApplicationBaseInfoResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.email)) {
    query['Email'] = request.email;
  }
  if (!Util.isUnset(request.owner)) {
    query['Owner'] = request.owner;
  }
  if (!Util.isUnset(request.phoneNumber)) {
    query['PhoneNumber'] = request.phoneNumber;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sApplicationBaseInfo',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/oam/update_app_basic_info`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies basic information about an application that is deployed in a Kubernetes cluster.
 *
 * @param request UpdateK8sApplicationBaseInfoRequest
 * @return UpdateK8sApplicationBaseInfoResponse
 */
async function updateK8sApplicationBaseInfo(request: UpdateK8sApplicationBaseInfoRequest): UpdateK8sApplicationBaseInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sApplicationBaseInfoWithOptions(request, headers, runtime);
}

model UpdateK8sApplicationConfigRequest {
  appId?: string(name='AppId', description='The ID of the application. You can query the application ID by calling the ListApplication operation. For more information, see [ListApplication](https://help.aliyun.com/document_detail/423162.html).

This parameter is required.', example='23bf94d9-****-4994-9917-616a827aa777'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster. You can query the cluster ID by calling the ListCluster operation. For more information, see [ListCluster](https://help.aliyun.com/document_detail/411844.html).', example='9c28bbb9-****-44b3-b953-54ef8a2d0be2'),
  cpuLimit?: string(name='CpuLimit', description='The maximum number of CPU cores allowed for each application instance when the application is running. The value 0 indicates that no limit is set on CPU cores.', example='1'),
  cpuRequest?: string(name='CpuRequest', description='The number of CPU cores requested for each application instance when the application is running. Unit: cores. We recommend that you set this parameter. The value 0 indicates that no limit is set on CPU cores.

> You must set this parameter together with the CpuLimit parameter. Make sure that the value of this parameter does not exceed that of the CpuLimit parameter.', example='1'),
  ephemeralStorageLimit?: string(name='EphemeralStorageLimit', description='The maximum size of space required by ephemeral storage. Unit: GB. The value 0 indicates that no limit is set on the ephemeral storage space.', example='4'),
  ephemeralStorageRequest?: string(name='EphemeralStorageRequest', description='The minimum size of space required by ephemeral storage. Unit: GB. The value 0 indicates that no limit is set on the ephemeral storage space.

> You must set this parameter together with the EphemeralStorageLimit parameter. Make sure that the value of this parameter does not exceed that of the EphemeralStorageLimit parameter.', example='2'),
  mcpuLimit?: string(name='McpuLimit', description='The maximum number of CPU cores allowed. The value 0 indicates that no limit is set on CPU cores.', example='1'),
  mcpuRequest?: string(name='McpuRequest', description='The minimum number of CPU cores required. Unit: cores. The value 0 indicates that no limit is set on CPU cores.

> You must set this parameter together with the CpuLimit parameter. Make sure that the value of this parameter does not exceed that of the CpuLimit parameter.', example='1000'),
  memoryLimit?: string(name='MemoryLimit', description='The maximum size of memory allowed for each application instance when the application is running. Unit: MB. The value 0 indicates that no limit is set on the memory size.', example='4'),
  memoryRequest?: string(name='MemoryRequest', description='The size of memory requested for each application instance when the application is running. Unit: MB. We recommend that you set this parameter. If you do not want to apply for a memory quota, set this parameter to 0.

> You must set this parameter together with the MemoryLimit parameter. Make sure that the value of this parameter does not exceed that of the MemoryLimit parameter.', example='400'),
  timeout?: int32(name='Timeout', description='The timeout period of the change process. Valid values: 1 to 1800. Default value: 600. Unit: seconds.', example='60'),
}

model UpdateK8sApplicationConfigResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='8806d1c6-****-48eb-9373-6bdef3007466'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-****'),
}

model UpdateK8sApplicationConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateK8sApplicationConfigResponseBody(name='body'),
}

/**
 * @summary Updates the configuration of an application in a Container Service for Kubernetes (ACK) or Serverless Kubernetes cluster.
 *
 * @param request UpdateK8sApplicationConfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sApplicationConfigResponse
 */
async function updateK8sApplicationConfigWithOptions(request: UpdateK8sApplicationConfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sApplicationConfigResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.cpuLimit)) {
    query['CpuLimit'] = request.cpuLimit;
  }
  if (!Util.isUnset(request.cpuRequest)) {
    query['CpuRequest'] = request.cpuRequest;
  }
  if (!Util.isUnset(request.ephemeralStorageLimit)) {
    query['EphemeralStorageLimit'] = request.ephemeralStorageLimit;
  }
  if (!Util.isUnset(request.ephemeralStorageRequest)) {
    query['EphemeralStorageRequest'] = request.ephemeralStorageRequest;
  }
  if (!Util.isUnset(request.mcpuLimit)) {
    query['McpuLimit'] = request.mcpuLimit;
  }
  if (!Util.isUnset(request.mcpuRequest)) {
    query['McpuRequest'] = request.mcpuRequest;
  }
  if (!Util.isUnset(request.memoryLimit)) {
    query['MemoryLimit'] = request.memoryLimit;
  }
  if (!Util.isUnset(request.memoryRequest)) {
    query['MemoryRequest'] = request.memoryRequest;
  }
  if (!Util.isUnset(request.timeout)) {
    query['Timeout'] = request.timeout;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sApplicationConfig',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_app_configuration`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Updates the configuration of an application in a Container Service for Kubernetes (ACK) or Serverless Kubernetes cluster.
 *
 * @param request UpdateK8sApplicationConfigRequest
 * @return UpdateK8sApplicationConfigResponse
 */
async function updateK8sApplicationConfig(request: UpdateK8sApplicationConfigRequest): UpdateK8sApplicationConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sApplicationConfigWithOptions(request, headers, runtime);
}

model UpdateK8sConfigMapRequest {
  clusterId?: string(name='ClusterId', description='The ID of the Kubernetes cluster.', example='7246cxxx-53xx-xxxx-xxxx-xxxxxxxx'),
  data?: map[string]any(name='Data', description='The data of the ConfigMap. Set this parameter to a JSON string.', example='[{"Key":"name","Value":"william"},{"Key":"age","Value":"12"}]'),
  name?: string(name='Name', description='The name of the ConfigMap. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length.', example='my-configmap'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
}

model UpdateK8sConfigMapResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='b197-40ab-9155-****'),
}

model UpdateK8sConfigMapResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateK8sConfigMapResponseBody(name='body'),
}

/**
 * @summary Modifies a Kubernetes ConfigMap.
 *
 * @param request UpdateK8sConfigMapRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sConfigMapResponse
 */
async function updateK8sConfigMapWithOptions(request: UpdateK8sConfigMapRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sConfigMapResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    body['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    body['Namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sConfigMap',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_config_map`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a Kubernetes ConfigMap.
 *
 * @param request UpdateK8sConfigMapRequest
 * @return UpdateK8sConfigMapResponse
 */
async function updateK8sConfigMap(request: UpdateK8sConfigMapRequest): UpdateK8sConfigMapResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sConfigMapWithOptions(request, headers, runtime);
}

model UpdateK8sIngressRuleRequest {
  annotations?: string(name='Annotations', description='The annotations.', example='{\\\\"nginx.ingress.kubernetes.io/ssl-redirect\\\\":\\\\"true\\\\",\\\\"nginx.ingress.kubernetes.io/configuration-snippet\\\\":\\\\"set $test value\\\\"}'),
  clusterId?: string(name='ClusterId', description='The ID of the Kubernetes cluster.', example='5b2b4ab4-efbc-4a81-9c45-xxxxxxxxxxxxx'),
  ingressConf?: map[string]any(name='IngressConf', description='The routing rules of the Ingress. Set this parameter to a JSON string in the following format:

    {
      "rules": [
        {
          "host": "abc.com",
          "secretName": "tls-secret",
          "paths": [
            {
              "path": "/path",
              "backend": {
                "servicePort": 80,
                "serviceName": "xxx"
              }
            }
          ]
        }
      ]
    }

Parameter description:

*   rules: the list of routing rules.
*   host: the domain name to be accessed.
*   secretName: the name of the Secret that stores the information about the Transport Layer Security (TLS) certificate. The certificate is required if you need to use the HTTPS protocol.
*   paths: the list of paths to be accessed.
*   path: the path to be accessed.
*   backend: the configuration of the backend service. You can specify a service that is created in the Enterprise Distributed Application Service (EDAS) console.
*   serviceName: the name of the backend service.
*   servicePort: the port of the backend service.', example='{"rules":[{"host":"abc.com","secretName":"tls-secret","paths":[{"path":"/path","backend":{"servicePort":80,"serviceName":"xxx"}}]}]}'),
  labels?: string(name='Labels', description='The labels.', example='{\\\\"test-label\\\\":\\\\"test-label-value\\\\"}'),
  name?: string(name='Name', description='The name of the Ingress. The name can contain lowercase letters, digits, and hyphens (-). It must start with a lowercase letter but cannot end with a hyphen (-). The name can be up to 63 characters in length.', example='my-ingress-rule'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
}

model UpdateK8sIngressRuleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
}

model UpdateK8sIngressRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateK8sIngressRuleResponseBody(name='body'),
}

/**
 * @summary Updates an ingress.
 *
 * @param request UpdateK8sIngressRuleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sIngressRuleResponse
 */
async function updateK8sIngressRuleWithOptions(request: UpdateK8sIngressRuleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sIngressRuleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.annotations)) {
    query['Annotations'] = request.annotations;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ingressConf)) {
    query['IngressConf'] = request.ingressConf;
  }
  if (!Util.isUnset(request.labels)) {
    query['Labels'] = request.labels;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sIngressRule',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_ingress`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Updates an ingress.
 *
 * @param request UpdateK8sIngressRuleRequest
 * @return UpdateK8sIngressRuleResponse
 */
async function updateK8sIngressRule(request: UpdateK8sIngressRuleRequest): UpdateK8sIngressRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sIngressRuleWithOptions(request, headers, runtime);
}

model UpdateK8sResourceRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='2e7059e9-2d********5e8ecac64ff'),
  namespace?: string(name='Namespace', description='The ID of the namespace to which the Kubernetes resource belongs.', example='app-namespace'),
  resourceContent?: string(name='ResourceContent', description='The description of the resource in the YAML format.', example='apiVersion: apps/v1 kind: Deployment metadata:   name: demo-app   namespace: app-namespace spec:   replicas: 3   selector:     matchLabels:       cluster: abc   template: # create pods using pod definition in this template     metadata:       labels:         cluster: abc     spec:       containers:       - image: registry-vpc.cn-hangzhou.aliyuncs.com/edas-demo-image/consumer:1.0         imagePullPolicy: Always         name: test-container         ports:         - containerPort: 80         env:         - name: foo           value: bar'),
}

model UpdateK8sResourceResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='7638276F-****-****-884F-54CC0BC84A8D'),
}

model UpdateK8sResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateK8sResourceResponseBody(name='body'),
}

/**
 * @summary Updates a specified resource in a Kubernetes cluster.
 *
 * @description > You can update only Deployments.
 *
 * @param request UpdateK8sResourceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sResourceResponse
 */
async function updateK8sResourceWithOptions(request: UpdateK8sResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sResourceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    body['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.namespace)) {
    body['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.resourceContent)) {
    body['ResourceContent'] = request.resourceContent;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sResource',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/oam/update_k8s_resource_config`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Updates a specified resource in a Kubernetes cluster.
 *
 * @description > You can update only Deployments.
 *
 * @param request UpdateK8sResourceRequest
 * @return UpdateK8sResourceResponse
 */
async function updateK8sResource(request: UpdateK8sResourceRequest): UpdateK8sResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sResourceWithOptions(request, headers, runtime);
}

model UpdateK8sSecretRequest {
  base64Encoded?: boolean(name='Base64Encoded', description='Specifies whether the data has been encoded in Base64.', example='false'),
  certId?: string(name='CertId', description='The ID of the certificate.', example='6650277'),
  certRegionId?: string(name='CertRegionId', description='The region ID of the certificate.', example='cn-hangzhou'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster.', example='9c28bbb9-****-44b3-b953-54ef8a2d0be2'),
  data?: string(name='Data', description='The data of the Secret. The value must be a JSON array that contains the following information:

*   Key: Secret key
*   Value: Secret value', example='[{"Key":"name","Value":"william"},{"Key":"age","Value":"12"}]'),
  name?: string(name='Name', description='The name of the Secret. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length.', example='my-secret'),
  namespace?: string(name='Namespace', description='The namespace of the Kubernetes cluster.', example='default'),
  type?: string(name='Type', description='The type of the Secret. Valid values:

*   Opaque: user-defined data type
*   kubernetes.io/tls: Transport Layer Security (TLS) certificate type', example='Opaque'),
}

model UpdateK8sSecretResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-****************'),
}

model UpdateK8sSecretResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateK8sSecretResponseBody(name='body'),
}

/**
 * @summary Modifies a Kubernetes Secret.
 *
 * @param request UpdateK8sSecretRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sSecretResponse
 */
async function updateK8sSecretWithOptions(request: UpdateK8sSecretRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sSecretResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.base64Encoded)) {
    body['Base64Encoded'] = request.base64Encoded;
  }
  if (!Util.isUnset(request.certId)) {
    body['CertId'] = request.certId;
  }
  if (!Util.isUnset(request.certRegionId)) {
    body['CertRegionId'] = request.certRegionId;
  }
  if (!Util.isUnset(request.clusterId)) {
    body['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    body['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sSecret',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_secret`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a Kubernetes Secret.
 *
 * @param request UpdateK8sSecretRequest
 * @return UpdateK8sSecretResponse
 */
async function updateK8sSecret(request: UpdateK8sSecretRequest): UpdateK8sSecretResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sSecretWithOptions(request, headers, runtime);
}

model UpdateK8sServiceRequest {
  appId?: string(name='AppId', description='The ID of the application.

This parameter is required.', example='5a166fbd-****-****-a286-781659d9f54c'),
  externalTrafficPolicy?: string(name='ExternalTrafficPolicy', description='The policy used for external traffic management. Valid values:

*   Local: local mode
*   Cluster: cluster mode

Default value: Local.', example='Local'),
  name?: string(name='Name', description='The name of the service in a Kubernetes cluster.

*   The name can contain lowercase letters, digits, and hyphens (-).
*   It must start with a letter and end with a letter or digit.
*   The name can be 2 to 32 characters in length.

This parameter is required.', example='service-http'),
  servicePorts?: string(name='ServicePorts', description='The mappings between service ports. Set this parameter to a JSON array. The following parameters are included in the configurations:

*   **protocol**: the protocol used by the service. Valid values: TCP and UDP. This parameter is required.
*   **port**: the frontend service port. Valid values: 1 to 65535. This parameter is required.
*   **targetPort**: the backend container port. Valid values: 1 to 65535. This parameter is required.

Example: `[{"protocol": "TCP", "port": 80, "targetPort": 8080},{"protocol": "TCP", "port": 81, "targetPort": 8081}]`', example='[{"protocol":"TCP","port":80,"targetPort":8080}]'),
  type?: string(name='Type', description='The type of the service in a Kubernetes cluster. Set the value to ClusterIP.

This parameter is required.', example='ClusterIP'),
}

model UpdateK8sServiceResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='b4b37bde-a125-****-****-741f7f4a9ae3'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-eiufh'),
}

model UpdateK8sServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateK8sServiceResponseBody(name='body'),
}

/**
 * @summary Updates an application service in a Kubernetes cluster.
 *
 * @param request UpdateK8sServiceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sServiceResponse
 */
async function updateK8sServiceWithOptions(request: UpdateK8sServiceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sServiceResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.externalTrafficPolicy)) {
    query['ExternalTrafficPolicy'] = request.externalTrafficPolicy;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.servicePorts)) {
    query['ServicePorts'] = request.servicePorts;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sService',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_service`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Updates an application service in a Kubernetes cluster.
 *
 * @param request UpdateK8sServiceRequest
 * @return UpdateK8sServiceResponse
 */
async function updateK8sService(request: UpdateK8sServiceRequest): UpdateK8sServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sServiceWithOptions(request, headers, runtime);
}

model UpdateK8sSlbRequest {
  appId?: string(name='AppId', description='The ID of the application. You can query the application ID by calling the ListApplication operation. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='5a166fbd-****-****-a286-781659d9f54c'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster. You can query the cluster ID by calling the GetK8sCluster operation. For more information, see [GetK8sCluster](https://help.aliyun.com/document_detail/181437.html).

This parameter is required.', example='712082c3-****-****-9217-a947b5cde6ee'),
  disableForceOverride?: boolean(name='DisableForceOverride', description='Specifies whether to disable listener configuration overriding.

*   true: disables listener configuration overriding.
*   false: enables listener configuration overriding.', example='true'),
  port?: string(name='Port', description='The frontend port. Valid values: 1 to 65535.', example='80'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm for the SLB instance. If you do not specify this parameter, the default value rr is used. SLB supports the following scheduling algorithms: round-robin and weighted round-robin. Valid values:

*   wrr: weighted round-robin scheduling. Backend servers that have higher weights receive more requests than those that have lower weights.
*   rr: round-robin scheduling. Requests are sequentially distributed to backend servers.', example='wrr'),
  servicePortInfos?: string(name='ServicePortInfos', description='The information about the ports. This parameter is required if you want to configure multi-port mappings or use a protocol other than TCP. You must set this parameter to a JSON array. Example: [{"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"1362469756373809_16c185d6fa2_1914500329_-xxxxxxx","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}]

*   port: required. The frontend port. Valid values: 1 to 65535. Each port must be unique.
*   targetPort: required. The backend port. Valid values: 1 to 65535.
*   loadBalancerProtocol: required. Valid values: TCP and HTTPS. If the HTTP protocol is used, set this parameter to TCP.
*   certId: the ID of the certificate. This parameter is required if the HTTPS protocol is used. You can purchase an SLB instance in the SLB console.
*   Note: The ServicePortInfos parameter is specified to support multi-port mappings. If you want this parameter to take effect, make sure that you specify the AppId, ClusterId, Type, and SlbId parameters.', example='{"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"136246975637380916c185d6fa21914500329_-xxxxxxx","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}'),
  slbName?: string(name='SlbName', description='The name of the SLB instance.', example='SLB_doctest'),
  slbProtocol?: string(name='SlbProtocol', description='The protocol used by the SLB instance. Set the value to TCP.', example='TCP'),
  specification?: string(name='Specification', description='The specifications of the SLB instance.

*   slb.s1.small
*   slb.s2.small
*   slb.s2.medium
*   slb.s3.small
*   slb.s3.medium
*   slb.s3.large

If you do not specify this parameter, the default value slb.s1.small is used.', example='slb.s1.small'),
  targetPort?: string(name='TargetPort', description='The backend port, which is also the service port of the application. Valid values: 1 to 65535.', example='8082'),
  type?: string(name='Type', description='The type of the SLB instance. Valid values:

*   Internet: an Internet-facing SLB instance
*   Intranet: an internal-facing SLB instance

This parameter is required.', example='Internet'),
}

model UpdateK8sSlbResponseBody = {
  changeOrderId?: string(name='ChangeOrderId', description='The ID of the change process.', example='9a1dcdee-****-****-ad37-cbf9dc91fba9'),
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-eiufh'),
}

model UpdateK8sSlbResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateK8sSlbResponseBody(name='body'),
}

/**
 * @summary Updates the Server Load Balancer (SLB) instance bound to an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request UpdateK8sSlbRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sSlbResponse
 */
async function updateK8sSlbWithOptions(request: UpdateK8sSlbRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sSlbResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.disableForceOverride)) {
    query['DisableForceOverride'] = request.disableForceOverride;
  }
  if (!Util.isUnset(request.port)) {
    query['Port'] = request.port;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.servicePortInfos)) {
    query['ServicePortInfos'] = request.servicePortInfos;
  }
  if (!Util.isUnset(request.slbName)) {
    query['SlbName'] = request.slbName;
  }
  if (!Util.isUnset(request.slbProtocol)) {
    query['SlbProtocol'] = request.slbProtocol;
  }
  if (!Util.isUnset(request.specification)) {
    query['Specification'] = request.specification;
  }
  if (!Util.isUnset(request.targetPort)) {
    query['TargetPort'] = request.targetPort;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sSlb',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/acs/k8s_slb_binding`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Updates the Server Load Balancer (SLB) instance bound to an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request UpdateK8sSlbRequest
 * @return UpdateK8sSlbResponse
 */
async function updateK8sSlb(request: UpdateK8sSlbRequest): UpdateK8sSlbResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sSlbWithOptions(request, headers, runtime);
}

model UpdateRoleRequest {
  actionData?: string(name='ActionData', description='The set of permissions to be granted to the role. The value is in the format of `Permission group ID 1:Permission serial number 1;...;Permission group ID n:Permission serial number n`. Example: `1:1;1:2;2:1;2:2`. For more information about permission groups and permission serial numbers, see [ListAuthority](https://help.aliyun.com/document_detail/149409.html).

This parameter is required.', example='15:1'),
  roleId?: int32(name='RoleId', description='The ID of the role. You can call the ListRole operation to query the role IDs. For more information, see [ListRole](https://help.aliyun.com/document_detail/149410.html).

This parameter is required.', example='32371'),
}

model UpdateRoleResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The additional information that is returned.', example='edit successfully'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='4823-bhjf-23u4-****'),
}

model UpdateRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRoleResponseBody(name='body'),
}

/**
 * @summary Modifies a role.
 *
 * @param request UpdateRoleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRoleResponse
 */
async function updateRoleWithOptions(request: UpdateRoleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateRoleResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.actionData)) {
    query['ActionData'] = request.actionData;
  }
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateRole',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/account/edit_role`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a role.
 *
 * @param request UpdateRoleRequest
 * @return UpdateRoleResponse
 */
async function updateRole(request: UpdateRoleRequest): UpdateRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateRoleWithOptions(request, headers, runtime);
}

model UpdateSlsLogStoreRequest {
  appId?: string(name='AppId', description='The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see [ListApplication](https://help.aliyun.com/document_detail/149390.html).

This parameter is required.', example='af58edcf-f7eb-****-****-db4e425f****'),
  configs?: string(name='Configs', description='The configurations of the Logstore.

*   The following parameters are included in the configurations:****

    *   **type**: the collection type. Set this parameter to file to specify the file type. Set this parameter to stdout to specify the standard output type.

    *   **logstore**: the name of the Logstore. Make sure that the name of the Logstore is unique in the cluster. The name must comply with the following rules:

        *   The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
        *   The name must start and end with a lowercase letter or a digit.
        *   The name must be 3 to 63 characters in length.

        **

        **Note**If you leave this parameter empty, the system automatically generates a name.

    *   **LogDir**: If the standard output type is used, the collection path is stdout.log. If the file type is used, the collection path is the path of the collected file. Wildcards (\\\\*) are supported. The collection path must match the following regular expression: `^/(.+)/(.*)^/$`.

This parameter is required.', example='[{"logstore":"thisisanotherfilelog","type":"file","logDir":"/var/log/*"},{"logstore":"","type":"stdout","logDir":"stdout.log"},{"logstore":"thisisafilelog","type":"file","logDir":"/tmp/log/*"}]'),
}

model UpdateSlsLogStoreResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  message?: string(name='Message', description='The message that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='D16979DC-4D42-**************'),
}

model UpdateSlsLogStoreResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateSlsLogStoreResponseBody(name='body'),
}

/**
 * @summary Configures a Logstore for an application.
 *
 * @param request UpdateSlsLogStoreRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateSlsLogStoreResponse
 */
async function updateSlsLogStoreWithOptions(request: UpdateSlsLogStoreRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateSlsLogStoreResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.configs)) {
    body['Configs'] = request.configs;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSlsLogStore',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/k8s/sls/update_sls_log_store`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Configures a Logstore for an application.
 *
 * @param request UpdateSlsLogStoreRequest
 * @return UpdateSlsLogStoreResponse
 */
async function updateSlsLogStore(request: UpdateSlsLogStoreRequest): UpdateSlsLogStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateSlsLogStoreWithOptions(request, headers, runtime);
}

model UpdateSwimmingLaneRequest {
  appInfos?: string(name='AppInfos', description='The list of applications that are related to the lane.', example='[{"appId":"8e7689af-6ddd-4676-8ee6-5fbecdf2****"},{"appId":"f72deaac-26ba-429a-948d-5fa47c4a****"},{"appId":"99a2d4b5-99a5-4e25-a964-1bd03a17****"}]'),
  enableRules?: boolean(name='EnableRules', description='Specifies whether to enable the throttling rule.

This parameter is required.', example='true'),
  entryRules?: string(name='EntryRules', description='The configuration of the throttling rule.', example='[{"priority":1,"path":"/traffictest","condition":"AND","restItems":[{"type":"header","name":"testheader","value":"testheadervalue","cond":"==","operator":"rawvalue"}]}]'),
  laneId?: long(name='LaneId', description='The ID of the lane.

This parameter is required.', example='224'),
  name?: string(name='Name', description='The name of the lane.', example='test-swimlane'),
}

model UpdateSwimmingLaneResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    entryRule?: string(name='EntryRule', description='The rule of the lane.', example='[{\\\\"condition\\\\":\\\\"AND\\\\",\\\\"enable\\\\":true,\\\\"path\\\\":\\\\"/traffictest\\\\",\\\\"priority\\\\":1,\\\\"restItems\\\\":[{\\\\"cond\\\\":\\\\"==\\\\",\\\\"datum\\\\":\\\\"testheadervalue\\\\",\\\\"name\\\\":\\\\"testheader\\\\",\\\\"operator\\\\":\\\\"rawvalue\\\\",\\\\"type\\\\":\\\\"header\\\\",\\\\"value\\\\":\\\\"testheadervalue\\\\"}]}]"'),
    groupId?: long(name='GroupId', description='The ID of the lane group.', example='171'),
    id?: long(name='Id', description='The ID of the lane.', example='321'),
    name?: string(name='Name', description='The name of the lane.', example='test-swimlane'),
    namespaceId?: string(name='NamespaceId', description='The ID of the namespace.', example='cn-beijing:qa'),
    swimmingLaneAppRelationShipList?: [ 
      {
        appId?: string(name='AppId', description='The ID of the application.', example='476d26d9-b54c-40b8-8af9-d898cdc2****'),
        appName?: string(name='AppName', description='The name of the application.', example='test-app'),
        laneId?: long(name='LaneId', description='The ID of the lane.', example='321'),
        rules?: string(name='Rules', description='The association rule.', example='dubbo'),
      }
    ](name='SwimmingLaneAppRelationShipList', description='The list of associations between the lane and the related application.'),
    tag?: string(name='Tag', description='The tag of the lane.', example='2cb6b8a'),
  }(name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='6CB46AEA-309C-5041-9EC7-FCF4478F****'),
}

model UpdateSwimmingLaneResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateSwimmingLaneResponseBody(name='body'),
}

/**
 * @param request UpdateSwimmingLaneRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateSwimmingLaneResponse
 */
async function updateSwimmingLaneWithOptions(request: UpdateSwimmingLaneRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateSwimmingLaneResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appInfos)) {
    query['AppInfos'] = request.appInfos;
  }
  if (!Util.isUnset(request.enableRules)) {
    query['EnableRules'] = request.enableRules;
  }
  if (!Util.isUnset(request.entryRules)) {
    query['EntryRules'] = request.entryRules;
  }
  if (!Util.isUnset(request.laneId)) {
    query['LaneId'] = request.laneId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSwimmingLane',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/trafficmgnt/swimming_lanes`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateSwimmingLaneRequest
 * @return UpdateSwimmingLaneResponse
 */
async function updateSwimmingLane(request: UpdateSwimmingLaneRequest): UpdateSwimmingLaneResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateSwimmingLaneWithOptions(request, headers, runtime);
}

model UpdateSwimmingLaneGroupRequest {
  appIds?: string(name='AppIds', description='The list of application IDs related to the lane group.', example='8e7689af-6ddd-4676-8ee6-5fbecdf2****,f72deaac-26ba-429a-948d-5fa47c4a****,5049d2c8-f997-4fc9-92a2-153506a6****,99a2d4b5-99a5-4e25-a964-1bd03a17****'),
  entryApp?: string(name='EntryApp', description='The ingress application. The application is in the EDAS:{application ID} format.', example='EDAS:dd2690a7-3fe4-4975-9a4c-5a60ffd6****'),
  groupId?: long(name='GroupId', description='The ID of the lane group.

This parameter is required.', example='98'),
  name?: string(name='Name', description='The name of the lane group.', example='test-swimlanegroup'),
}

model UpdateSwimmingLaneGroupResponseBody = {
  code?: int32(name='Code', description='The HTTP status code that is returned.', example='200'),
  data?: {
    applicationList?: [ 
      {
        appId?: string(name='AppId', description='The ID of the application.', example='476d26d9-b54c-40b8-8af9-d898cdc2****'),
        appName?: string(name='AppName', description='The name of the application.', example='test-app'),
      }
    ](name='ApplicationList', description='The list of applications related to the lane group.'),
    entryApplication?: {
      appId?: string(name='AppId', description='The ID of the application.', example='d52c9de9-53d0-4191-aa72-88974a6f****'),
      appName?: string(name='AppName', description='The name of the application.', example='test-gateway'),
    }(name='EntryApplication', description='The EDAS ingress gateway information.'),
    id?: long(name='Id', description='The ID of the lane group.', example='98'),
    name?: string(name='Name', description='The name of the lane group.', example='name'),
    namespaceId?: string(name='NamespaceId', description='The ID of the namespace.', example='cn-hangzhou:test'),
  }(name='Data', description='The data that is returned.'),
  message?: string(name='Message', description='The additional information that is returned.', example='success'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='7580ED24-A2F0-5ECC-9F2B-B92E2509****'),
}

model UpdateSwimmingLaneGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateSwimmingLaneGroupResponseBody(name='body'),
}

/**
 * @summary Updates a lane group.
 *
 * @param request UpdateSwimmingLaneGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateSwimmingLaneGroupResponse
 */
async function updateSwimmingLaneGroupWithOptions(request: UpdateSwimmingLaneGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateSwimmingLaneGroupResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.entryApp)) {
    query['EntryApp'] = request.entryApp;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSwimmingLaneGroup',
    version = '2017-08-01',
    protocol = 'HTTPS',
    pathname = `/pop/v5/trafficmgnt/swimming_lane_groups`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Updates a lane group.
 *
 * @param request UpdateSwimmingLaneGroupRequest
 * @return UpdateSwimmingLaneGroupResponse
 */
async function updateSwimmingLaneGroup(request: UpdateSwimmingLaneGroupRequest): UpdateSwimmingLaneGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateSwimmingLaneGroupWithOptions(request, headers, runtime);
}

